Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code snippets for Xamarin Forms XAML Platform-specifics
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>iOS Namespace</Title>
<Author>Damian Mehers</Author>
<Description>Snippet for a iOS namespace for platform specific code</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>psios</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>Bring in iOS platform specific namespace</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>iOS safearea</Title>
<Author>Damian Mehers</Author>
<Description>Snippet for a iOS safe area</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>pssa</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>iOS Safe Area</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[ios:Page.UseSafeArea="true"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Hide NavigationPage Bar Separator on iOS</Title>
<Author>Damian Mehers</Author>
<Description>Hide NavigationPage Bar Separator on iOS</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>psnpbs</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>Hide NavigationPage Bar Separator on iOS</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[ios:NavigationPage.HideNavigationBarSeparator="true"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Apply MasterDetailPage Shadow on iOS</Title>
<Author>Damian Mehers</Author>
<Description>Apply MasterDetailPage Shadow on iOS</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>psmdps</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>Apply MasterDetailPage Shadow on iOS</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[ios:MasterDetailPage.ApplyShadow="true"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Show Large Page Titles on iOS</Title>
<Author>Damian Mehers</Author>
<Description>Show Large Page Titles on iOS</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>pslpt</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>Show Large Page Titles on iOS</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[ios:NavigationPage.PrefersLargeTitles="true"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Show Home Indicator Visibility on iOS</Title>
<Author>Damian Mehers</Author>
<Description>Show Home Indicator Visibility on iOS</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>pshpi</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>Show Home Indicator Visibility on iOS</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[ios:Page.PrefersHomeIndicatorAutoHidden="true"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>Set Page Status Bar Visibility on iOS</Title>
<Author>Damian Mehers</Author>
<Description>Set Page Status Bar Visibility on iOS</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>pspsv</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>Value</ID>
<ToolTip>Set Page Status Bar Visibility on iOS</ToolTip>
<Function>
</Function>
</Literal>
</Declarations>
<Code Language="XAML">
<![CDATA[ios:Page.PrefersStatusBarHidden="True"$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.