Skip to content

Instantly share code, notes, and snippets.

@foxanna
Created September 16, 2018 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxanna/dda17ec84737edca13d17e446b986d4e to your computer and use it in GitHub Desktop.
Save foxanna/dda17ec84737edca13d17e446b986d4e to your computer and use it in GitHub Desktop.
<ContentPage ...
xmlns:effects="clr-namespace:<project>.Effects;assembly=<project>"
BackgroundColor="PaleTurquoise">
<ContentPage.Resources>
<ResourceDictionary>
<x:Int32 x:Key="SmallCornerRadius">4</x:Int32>
<x:Int32 x:Key="MediumCornerRadius">8</x:Int32>
<x:Int32 x:Key="LargeCornerRadius">16</x:Int32>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout ...
BackgroundColor="WhiteSmoke"
effects:RoundCornersEffect.CornerRadius="48">
<BoxView ...
BackgroundColor="Navy"
effects:RoundCornersEffect.CornerRadius="{StaticResource LargeCornerRadius}" />
<Label ...
TextColor="White"
BackgroundColor="DeepSkyBlue"
effects:RoundCornersEffect.CornerRadius="{StaticResource SmallCornerRadius}" />
<ContentView ...
effects:RoundCornersEffect.CornerRadius="{StaticResource MediumCornerRadius}">
<Image ...
Source="..." />
</ContentView>
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment