SubscriptionsPage.xaml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!--
  2. Copyright © 2011-2012 Nokia Corporation. All rights reserved.
  3. Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation.
  4. Other product and company names mentioned herein may be trademarks
  5. or trade names of their respective owners.
  6. See LICENSE.TXT for license information.
  7. -->
  8. <phone:PhoneApplicationPage
  9. x:Class="RSSReader.Views.SubscriptionsPage"
  10. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  11. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  12. xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  13. xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  14. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  15. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  16. FontFamily="{StaticResource PhoneFontFamilyNormal}"
  17. FontSize="{StaticResource PhoneFontSizeNormal}"
  18. Foreground="{StaticResource PhoneForegroundBrush}"
  19. SupportedOrientations="Portrait" Orientation="Portrait"
  20. mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
  21. shell:SystemTray.IsVisible="False">
  22. <phone:PhoneApplicationPage.Resources>
  23. <Style x:Key="MyCheckBoxStyle" TargetType="CheckBox">
  24. <Setter Property="Template">
  25. <Setter.Value>
  26. <ControlTemplate TargetType="CheckBox">
  27. <Grid Background="Transparent">
  28. <VisualStateManager.VisualStateGroups>
  29. <VisualStateGroup x:Name="CommonStates">
  30. <VisualState x:Name="Normal"/>
  31. <VisualState x:Name="Pressed">
  32. <Storyboard>
  33. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckMark">
  34. <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneRadioCheckBoxCheckBrush}"/>
  35. </ObjectAnimationUsingKeyFrames>
  36. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="CheckBackground">
  37. <DiscreteObjectKeyFrame KeyTime="0" Value="LightGray"/>
  38. </ObjectAnimationUsingKeyFrames>
  39. </Storyboard>
  40. </VisualState>
  41. </VisualStateGroup>
  42. <VisualStateGroup x:Name="CheckStates">
  43. <VisualState x:Name="Checked">
  44. <Storyboard>
  45. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CheckMark">
  46. <DiscreteObjectKeyFrame KeyTime="0">
  47. <DiscreteObjectKeyFrame.Value>
  48. <Visibility>Visible</Visibility>
  49. </DiscreteObjectKeyFrame.Value>
  50. </DiscreteObjectKeyFrame>
  51. </ObjectAnimationUsingKeyFrames>
  52. </Storyboard>
  53. </VisualState>
  54. <VisualState x:Name="Unchecked"/>
  55. </VisualStateGroup>
  56. </VisualStateManager.VisualStateGroups>
  57. <Grid Margin="{StaticResource PhoneTouchTargetLargeOverhang}">
  58. <Grid.ColumnDefinitions>
  59. <ColumnDefinition Width="32"/>
  60. <ColumnDefinition Width="*"/>
  61. </Grid.ColumnDefinitions>
  62. <Border x:Name="CheckBackground" BorderBrush="Black" BorderThickness="{StaticResource PhoneBorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="Left" Height="32" IsHitTestVisible="False" VerticalAlignment="Center" Width="32"/>
  63. <Path x:Name="CheckMark" Data="M0,119 L31,92 L119,185 L267,0 L300,24 L122,250 z" Fill="{StaticResource PhoneRadioCheckBoxCheckBrush}" HorizontalAlignment="Center" Height="18" IsHitTestVisible="False" Stretch="Fill" StrokeThickness="2" StrokeLineJoin="Round" Visibility="Collapsed" VerticalAlignment="Center" Width="24"/>
  64. <ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="12,0,0,0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  65. </Grid>
  66. </Grid>
  67. </ControlTemplate>
  68. </Setter.Value>
  69. </Setter>
  70. </Style>
  71. </phone:PhoneApplicationPage.Resources>
  72. <Grid x:Name="LayoutRoot" Background="White">
  73. <Grid.RowDefinitions>
  74. <RowDefinition Height="Auto"/>
  75. <RowDefinition Height="*"/>
  76. </Grid.RowDefinitions>
  77. <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
  78. <TextBlock x:Name="ApplicationTitle" Text="RSSREADER" Style="{StaticResource PhoneTextNormalStyle}" Foreground="Black" />
  79. <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Foreground="Black" />
  80. </StackPanel>
  81. <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
  82. <ListBox Height="607" HorizontalAlignment="Left" Name="subscriptionsListBox" VerticalAlignment="Top" Width="460">
  83. <ListBox.ItemTemplate>
  84. <DataTemplate>
  85. <StackPanel Orientation="Horizontal">
  86. <CheckBox x:Name="cbSelection"
  87. Style="{StaticResource MyCheckBoxStyle}"
  88. Content="{Binding Title}"
  89. Foreground="Black" Background="White"
  90. IsChecked="{Binding IsVisible, Mode=TwoWay}"/>
  91. </StackPanel>
  92. </DataTemplate>
  93. </ListBox.ItemTemplate>
  94. </ListBox>
  95. </Grid>
  96. </Grid>
  97. <phone:PhoneApplicationPage.ApplicationBar>
  98. <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" BackgroundColor="White" ForegroundColor="Black">
  99. <shell:ApplicationBarIconButton IconUri="/Resources/appbar.cancel.rest.png" Text="Cancel" Click="CancelSettings_Click" />
  100. <shell:ApplicationBarIconButton IconUri="/Resources/appbar.save.rest.png" Text="Save" Click="SaveSettings_Click" />
  101. </shell:ApplicationBar>
  102. </phone:PhoneApplicationPage.ApplicationBar>
  103. </phone:PhoneApplicationPage>