Advertisement
Guest User

Untitled

a guest
May 20th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.04 KB | None | 0 0
  1. <Style TargetType="controls:CustomMessageBox">
  2.         <Setter Property="VerticalAlignment" Value="Top"/>
  3.         <Setter Property="HorizontalContentAlignment" Value="Left"/>
  4.         <Setter Property="VerticalContentAlignment" Value="Top"/>
  5.         <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
  6.         <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeNormal}"/>
  7.         <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
  8.         <Setter Property="Background" Value="{StaticResource PhoneChromeBrush}"/>
  9.         <Setter Property="Margin" Value="0"/>
  10.         <Setter Property="Template">
  11.             <Setter.Value>
  12.                 <ControlTemplate TargetType="controls:CustomMessageBox">
  13.                     <Grid
  14.                        Background="{TemplateBinding Background}"
  15.                        HorizontalAlignment="Stretch">
  16.                         <Grid
  17.                            Width="480"                                                      
  18.                            HorizontalAlignment="Left">
  19.                             <Grid.RowDefinitions>
  20.                                 <RowDefinition Height="*"/>
  21.                                 <RowDefinition Height="Auto"/>
  22.                             </Grid.RowDefinitions>
  23.                             <Grid.ColumnDefinitions>
  24.                                 <ColumnDefinition Width="*"/>
  25.                                 <ColumnDefinition Width="*"/>
  26.                             </Grid.ColumnDefinitions>
  27.                             <StackPanel
  28.                                Grid.ColumnSpan="2"
  29.                                Margin="0,0,0,18">
  30.                                 <TextBlock
  31.                                    x:Name="TitleTextBlock"
  32.                                    Text="{TemplateBinding Title}"
  33.                                    Foreground="{TemplateBinding Foreground}"
  34.                                    Visibility="Collapsed"
  35.                                    Margin="24,16,24,-6"
  36.                                    FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
  37.                                 <TextBlock
  38.                                    x:Name="CaptionTextBlock"
  39.                                    Text="{TemplateBinding Caption}"
  40.                                    Foreground="{TemplateBinding Foreground}"
  41.                                    Visibility="Collapsed"
  42.                                    Margin="24,8,24,0"
  43.                                    FontSize="{StaticResource PhoneFontSizeLarge}"                                    
  44.                                    FontFamily="{StaticResource PhoneFontFamilySemiBold}"
  45.                                    TextWrapping="Wrap"
  46.                                    HorizontalAlignment="Left"/>
  47.                                 <TextBlock
  48.                                    x:Name="MessageTextBlock"
  49.                                    Text="{TemplateBinding Message}"
  50.                                    Foreground="{TemplateBinding Foreground}"
  51.                                    Margin="24,11,24,0"
  52.                                    Visibility="Collapsed"
  53.                                    FontSize="{StaticResource PhoneFontSizeMedium}"
  54.                                    FontFamily="{StaticResource PhoneFontFamilySemiLight}"                                                                        
  55.                                    TextWrapping="Wrap"
  56.                                    HorizontalAlignment="Left"/>
  57.                                 <ContentPresenter Margin="12,0,0,0"/>
  58.                             </StackPanel>
  59.                             <Button
  60.                                x:Name="LeftButton"  
  61.                                Grid.Row="1" Grid.Column="0"
  62.                                Content="{TemplateBinding LeftButtonContent}"
  63.                                IsEnabled="{TemplateBinding IsLeftButtonEnabled}"
  64.                                Foreground="{TemplateBinding Foreground}"
  65.                                Margin="12,0,0,12"  
  66.                                Visibility="Collapsed"                                                            
  67.                                controls:TiltEffect.IsTiltEnabled="True"/>
  68.                             <Button
  69.                                x:Name="RightButton"
  70.                                Grid.Row="1" Grid.Column="1"
  71.                                Content="{TemplateBinding RightButtonContent}"
  72.                                IsEnabled="{TemplateBinding IsRightButtonEnabled}"
  73.                                Foreground="{TemplateBinding Foreground}"
  74.                                Margin="0,0,12,12"
  75.                                Visibility="Collapsed"                            
  76.                                controls:TiltEffect.IsTiltEnabled="True"/>
  77.                         </Grid>
  78.                     </Grid>
  79.                 </ControlTemplate>
  80.             </Setter.Value>
  81.         </Setter>
  82.     </Style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement