Created
April 22, 2014 09:34
-
-
Save Kinnara/11171940 to your computer and use it in GitHub Desktop.
FullScreenContentDialogStyle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style x:Key="FullScreenContentDialogStyle" TargetType="ContentDialog"> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="ContentDialog"> | |
<Border x:Name="Container"> | |
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup x:Name="Orientation"> | |
<VisualState x:Name="Portrait" /> | |
<VisualState x:Name="Landscape"> | |
<Storyboard> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="ContentPanel" EnableDependentAnimation="True"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ContentDialogContentLandscapeWidth}" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="HorizontalAlignment" Storyboard.TargetName="ContentPanel"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Left" /> | |
</ObjectAnimationUsingKeyFrames> | |
</Storyboard> | |
</VisualState> | |
</VisualStateGroup> | |
</VisualStateManager.VisualStateGroups> | |
<Grid x:Name="LayoutRoot"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |
<Border x:Name="BackgroundElement" | |
Background="{TemplateBinding Background}" | |
FlowDirection="LeftToRight"> | |
<Border FlowDirection="{TemplateBinding FlowDirection}"> | |
<Grid x:Name="ContentPanel"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" MinHeight="{ThemeResource ContentDialogTitleMinHeight}" /> | |
<RowDefinition Height="*" MinHeight="{ThemeResource ContentDialogContentMinHeight}" /> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="*" /> | |
<ColumnDefinition Width="*" /> | |
</Grid.ColumnDefinitions> | |
<ContentControl x:Name="Title" | |
Margin="{ThemeResource ContentDialogTitleMargin}" | |
Content="{TemplateBinding Title}" | |
ContentTemplate="{TemplateBinding TitleTemplate}" | |
FontSize="{StaticResource TextStyleExtraLargeFontSize}" | |
FontFamily="{ThemeResource PhoneFontFamilyNormal}" | |
FontWeight="SemiBold" | |
Grid.ColumnSpan="2" /> | |
<ContentPresenter x:Name="Content" | |
ContentTemplate="{TemplateBinding ContentTemplate}" | |
Content="{TemplateBinding Content}" | |
FontSize="{StaticResource TextStyleLargeFontSize}" | |
FontFamily="{ThemeResource PhoneFontFamilyNormal}" | |
Margin="{ThemeResource ContentDialogContentMargin}" | |
Grid.Row="1" | |
Grid.ColumnSpan="2" /> | |
<Border x:Name="Button1Host" Padding="{ThemeResource ContentDialogButton1HostPadding}" Grid.Row="2" /> | |
<Border x:Name="Button2Host" Padding="{ThemeResource ContentDialogButton2HostPadding}" Grid.Row="2" Grid.Column="1" /> | |
</Grid> | |
</Border> | |
</Border> | |
</Grid > | |
</Border> | |
</ControlTemplate> | |
</Setter.Value> | |
</Setter> | |
</Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment