Mercurial > silverbladetech
diff Messaging/Common/Themes/Generic.xaml @ 35:83c1f62d9370
All working except image so far
author | adminsh@apollo |
---|---|
date | Tue, 27 Mar 2012 16:15:45 +0100 |
parents | |
children | c8c79f05d76f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Messaging/Common/Themes/Generic.xaml Tue Mar 27 16:15:45 2012 +0100 @@ -0,0 +1,76 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:c="clr-namespace:Common.Controls"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="/Elysium.Theme;component/Themes/SharedResources.xaml" /> + </ResourceDictionary.MergedDictionaries> + + <Style TargetType="{x:Type c:MetroTile}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type c:MetroTile}"> + <Grid Background="Black"> + + <Grid.RowDefinitions> + <RowDefinition Height="*" /> + <RowDefinition Height="*" /> + <RowDefinition Height="1.25*" /> + </Grid.RowDefinitions> + + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*" /> + <ColumnDefinition Width="*" /> + </Grid.ColumnDefinitions> + + <Image x:Name="PART_DISPLAY_ICON" + Grid.Row="0" + Grid.Column="0" + Margin="10,10,0,0" + HorizontalAlignment="Left" + VerticalAlignment="Top" + Source="{Binding Path=DisplayIcon, + RelativeSource={RelativeSource FindAncestor, + AncestorType=c:MetroTile, + AncestorLevel=1}, + UpdateSourceTrigger=PropertyChanged}" + Stretch="None" /> + + <TextBlock x:Name="PART_DISPLAY_COUNT_CONTAINER" + Grid.Row="1" + Grid.Column="0" + Grid.ColumnSpan="2" + Margin="0,0,10,0" + HorizontalAlignment="Right" + FontSize="48" + Foreground="White" + Text="{Binding Path=DisplayCount, + StringFormat=N0, + RelativeSource={RelativeSource FindAncestor, + AncestorType=c:MetroTile, + AncestorLevel=1}, + UpdateSourceTrigger=PropertyChanged}" /> + + <TextBlock x:Name="PART_DISPLAY_TITLE_CONTAINER" + Grid.Row="2" + Grid.RowSpan="2" + Grid.Column="0" + Grid.ColumnSpan="3" + Margin="10" + HorizontalAlignment="Right" + VerticalAlignment="Bottom" + FontSize="24" + Foreground="White" + Text="{Binding Path=DisplayText, + RelativeSource={RelativeSource FindAncestor, + AncestorType=c:MetroTile, + AncestorLevel=1}, + UpdateSourceTrigger=PropertyChanged}" + TextWrapping="Wrap" /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary> \ No newline at end of file