Skip to content

Instantly share code, notes, and snippets.

@kzu
Last active August 29, 2015 14:22
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 kzu/11b9917d2bc7a96aa965 to your computer and use it in GitHub Desktop.
Save kzu/11b9917d2bc7a96aa965 to your computer and use it in GitHub Desktop.
Move La Trucha demo

Move La Trucha

This demo shows a dynamic view.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Padding="40">
<ContentPage.BackgroundColor>
<OnPlatform x:TypeArguments="Color" Android="White" />
</ContentPage.BackgroundColor>
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="TextColor">
<OnPlatform x:TypeArguments="Color" Android="Black" />
</Setter>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout Padding="0, 20, 0, 0">
<Image Source="http://www.blueberg.com.ar/image/fish/rio/trucha.jpg"
Rotation="{Binding Rotate}"
Scale="{Binding Scale}"
HeightRequest="300"/>
<Slider Maximum="360"
Value="{Binding Rotate, Mode=TwoWay}"
VerticalOptions="CenterAndExpand" />
<Slider Maximum="4"
Value="{Binding Scale, Mode=TwoWay}"
VerticalOptions="CenterAndExpand" />
<Label Text="{Binding Rotate, StringFormat='The angle is {0:F0} degrees'}"
FontAttributes="Bold"
FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
<Label Text="{Binding Scale, StringFormat='The scale is {0:F1}x'}"
FontAttributes="Bold"
FontSize="Large"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment