This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** | |
In Shared code: | |
public class WebViewPage : ContentPage | |
{ | |
} | |
... | |
await Navigation.PushAsync (new WebViewPage()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackLayout VerticalOptions="Center"> | |
<Label x:Name="lblText" Text="0" HorizontalOptions="Start" FontSize="Micro" HorizontalTextAlignment="Center" VerticalOptions="EndAndExpand" > | |
<Label.Margin> | |
<OnPlatform x:TypeArguments="Thickness"> | |
<On Platform="iOS" Value="15,0" /> | |
<On Platform="Android" Value="10,0" /> | |
</OnPlatform> | |
</Label.Margin> | |
</Label> | |
<Slider x:Name="mySlider" Maximum="10000" Minimum="100" HorizontalOptions="FillAndExpand" ValueChanged="Handle_ValueChanged" > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmptyCollectionContractResolver : DefaultContractResolver { | |
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) { | |
JsonProperty property = base.CreateProperty(member, memberSerialization); | |
Predicate<object> shouldSerialize = property.ShouldSerialize; | |
property.ShouldSerialize = obj => (shouldSerialize == null || shouldSerialize(obj)) && !IsEmptyCollection(property, obj); | |
return property; | |
} | |
private bool IsEmptyCollection(JsonProperty property, object target) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="MyApp.LayoutPage"> | |
<ContentPage.Content> | |
<StackLayout> | |
<Image Source="icon.png" /> | |
</StackLayout> | |
</ContentPage.Content> | |
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Slider_ValueChanged(object sender, Xamarin.Forms.ValueChangedEventArgs e) | |
{ | |
var newStep = Math.Round(e.NewValue / 100); | |
mySlider.Value = newStep * 100; | |
lblText.Text = mySlider.Value.ToString(); | |
lblText.TranslateTo(mySlider.Value * ((mySlider.Width - 40) / mySlider.Maximum) , 0, 100); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
app.UseSwagger(); | |
app.UseSwaggerUI(c => | |
{ | |
c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyWebAPI Helper Page"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
//Helper için | |
services.AddSwaggerGen(c => | |
{ | |
c.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info | |
{ | |
Version = "v1", | |
Title = "My Web API", | |
Description = "Awesome WEB API", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:control="clr-namespace:XFEmptyViewSample.Controls" | |
xmlns:helper="clr-namespace:XFEmptyViewSample.Helpers" | |
xmlns:viewmodel="clr-namespace:XFEmptyViewSample.ViewModels" | |
x:Class="XFEmptyViewSample.Views.ListViewPage" Title="Birds"> | |
<ContentPage.BindingContext> | |
<viewmodel:ListViewPageViewModel/> | |
</ContentPage.BindingContext> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ListViewPageViewModel : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
protected void OnPropertyChanged([CallerMemberName]string propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | |
private IList<Birds> birdsList; | |
bool isRefreshing; | |
private bool isEmpty; | |
public bool IsEmpty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Birds | |
{ | |
public string Title { get; set; } | |
public string Description { get; set; } | |
} |
OlderNewer