PushSettingsControl.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <UserControl x:Class="WindowsPhone.Recipes.Push.Client.Controls.PushSettingsControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:tk="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
  5. xmlns:converters="clr-namespace:WindowsPhone.Recipes.Push.Client.Converters"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. mc:Ignorable="d"
  9. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  10. FontSize="{StaticResource PhoneFontSizeNormal}"
  11. Foreground="{StaticResource PhoneForegroundBrush}"
  12. d:DesignHeight="640" d:DesignWidth="480">
  13. <UserControl.Resources>
  14. <converters:BoolBrushConverter x:Key="BoolBrushConverter" />
  15. <Style x:Key="DescTextStyle" TargetType="TextBlock">
  16. <Setter Property="FontSize" Value="14" />
  17. <Setter Property="Foreground" Value="Silver" />
  18. <Setter Property="TextWrapping" Value="Wrap" />
  19. <Setter Property="Margin" Value="16,-38,16,24" />
  20. </Style>
  21. </UserControl.Resources>
  22. <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">
  23. <StackPanel>
  24. <StackPanel>
  25. <tk:ToggleSwitch Header="Push Notifications"
  26. IsChecked="{Binding IsPushEnabled, Mode=TwoWay}" />
  27. <TextBlock Style="{StaticResource DescTextStyle}"
  28. Text="Turn on/off push notifications." />
  29. </StackPanel>
  30. <Grid>
  31. <StackPanel Margin="16,0,0,0">
  32. <tk:ToggleSwitch Header="Tile Notifications"
  33. IsChecked="{Binding IsTileEnabled, Mode=TwoWay}" />
  34. <TextBlock Style="{StaticResource DescTextStyle}"
  35. Text="Tile push notifications update the application's tile displayed in the Start Screen. The application must be pinned by the user first." />
  36. <tk:ToggleSwitch Header="Toast Notifications"
  37. IsChecked="{Binding IsToastEnabled, Mode=TwoWay}" />
  38. <TextBlock Style="{StaticResource DescTextStyle}"
  39. Text="Toast push notifications are system-wide notifications that do not disrupt the user workflow or require intervention to resolve and are displayed in the top of the screen for ten seconds." />
  40. <tk:ToggleSwitch Header="Raw Notifications"
  41. IsChecked="{Binding IsRawEnabled, Mode=TwoWay}" />
  42. <TextBlock Style="{StaticResource DescTextStyle}"
  43. Text="Raw push notifications are used to send application specific information. The application must be running first." />
  44. </StackPanel>
  45. <Border Background="{Binding IsPushEnabled, Converter={StaticResource BoolBrushConverter}}" />
  46. </Grid>
  47. </StackPanel>
  48. </Grid>
  49. </UserControl>