Skip to content

Instantly share code, notes, and snippets.

@mbmccormick
Created March 6, 2012 02:35
Show Gist options
  • Save mbmccormick/1982999 to your computer and use it in GitHub Desktop.
Save mbmccormick/1982999 to your computer and use it in GitHub Desktop.
Settings page used in Milkman
<phone:PhoneApplicationPage
x:Class="Milkman.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
shell:SystemTray.IsVisible="True"
toolkit:TiltEffect.IsTiltEnabled="True">
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="MILKMAN" Style="{StaticResource PhoneTextNormalStyle}" FontWeight="Bold"/>
<TextBlock x:Name="PageTitle" Text="settings" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Grid.Row="1" Margin="12,0,12,0">
<toolkit:ToggleSwitch x:Name="togBackgroundWorker" Content="On" IsChecked="true" Header="Sync data in the background" Checked="ToggleSwitch_Checked" Unchecked="ToggleSwitch_Unchecked" />
<toolkit:ToggleSwitch x:Name="togLocationService" Content="On" IsChecked="true" Header="Notify me when tasks are nearby" Checked="ToggleSwitch_Checked" Unchecked="ToggleSwitch_Unchecked" />
<toolkit:ToggleSwitch x:Name="togTaskReminders" Content="On" IsChecked="true" Header="Remind me before tasks are due" Checked="ToggleSwitch_Checked" Unchecked="ToggleSwitch_Unchecked" />
<toolkit:ToggleSwitch x:Name="togManualSync" Content="Off" IsChecked="false" Header="Manually sync tasks (faster loading)" Checked="ToggleSwitch_Checked" Unchecked="ToggleSwitch_Unchecked" />
</ScrollViewer>
</Grid>
<toolkit:TransitionService.NavigationInTransition>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardIn"/>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardIn"/>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardOut"/>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardOut"/>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>
</phone:PhoneApplicationPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment