This file contains hidden or 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
protected override void OnAppearing() | |
{ | |
base.OnAppearing(); | |
if (hasInstance) | |
{ | |
Device.BeginInvokeOnMainThread(() => | |
{ | |
//do something | |
hasInstance = false; | |
}); |
This file contains hidden or 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
//case 1: First | |
try | |
{ | |
var result1 = List.First(x => x == "foo"); | |
} | |
catch (Exception) | |
{ | |
//catch | |
} |
This file contains hidden or 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
this.InitializeComponent (); |
This file contains hidden or 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
/* | |
x:Class | |
xmlns, xmlns:x, xmlns:d, xmlns:mc, mc:Ignorable, xmlns:* | |
x:Key, Key, x:Name, Name, x:Uid, Uid, Title | |
x:TypeArguments, x:DataType, x:* | |
BindingContext, TabIndex | |
Grid.Row*, Grid.Column*, RowSpacing, ColumnSpacing, AbsoluteLayout.LayoutFlags, AbsoluteLayout.LayoutBounds | |
IsVisible | |
Style* | |
WidthRequest, HeightRequest, MinimumWidthRequest, MinimumHeightRequest, M*Width, M*Height |
This file contains hidden or 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
BtnTop.TranslateTo(0, -70), | |
BtnTop.FadeTo(1), | |
BtnLeft.TranslateTo(-70, 0), | |
BtnLeft.FadeTo(1), | |
ActionBtn.FadeTo(0.4) |
This file contains hidden or 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.Resources> | |
<ResourceDictionary> | |
<Style TargetType="Label"> | |
<Setter Property="HorizontalOptions" Value="End" /> | |
</Style> | |
</ResourceDictionary> | |
</StackLayout.Resources> |
This file contains hidden or 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
<Label | |
Text="" | |
FontFamily="fa5_solid.otf#fa-solid" | |
FontSize="20" /> |
This file contains hidden or 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
//XAML | |
WidthRequest = "{x:OnPlatform Android=20, iOS=15, Default=20}" | |
Source = "{x:OnPlatform iOS='icon1.png', Android='icon2.png'}" | |
<OnPlatform x:Key="color" x:TypeArguments="x:String"> | |
<On Platform="Android" Value="Red" /> | |
<On Platform="iOS" Value="Orange" /> | |
</OnPlatform> | |
//CSharp |
This file contains hidden or 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
//MyEntryRenderer : EntryRenderer | |
//for android | |
if (Control != null) | |
{ | |
Control.SetBackgroundColor(global::Android.Graphics.Color.LightYellow); | |
Control.SetCursorVisible(false); | |
Control.SetPadding(0, 0, 0, 0); | |
Control.Gravity = GravityFlags.CenterVertical | GravityFlags.Left; | |
} |
This file contains hidden or 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
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" |
OlderNewer