|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ucc="clr-namespace:BookReader.Controls"
>
<!-- Rectangle Style for Window borders and header -->
<Style x:Key="RectangleFrame" TargetType="{x:Type Rectangle}">
<Setter Property="RadiusX" Value="16"/>
<Setter Property="RadiusY" Value="16"/>
<Setter Property="Opacity" Value="0.8"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Fill" Value="{DynamicResource WindowBackgroundBrush}"/>
<Setter Property="BitmapEffect">
<Setter.Value>
<DropShadowBitmapEffect></DropShadowBitmapEffect>
</Setter.Value>
</Setter>
</Style>
<!-- Header control-->
<Style x:Key="Header" TargetType="{x:Type ucc:Header}">
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ucc:Header}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="2" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Rectangle Grid.ColumnSpan="3" Grid.RowSpan="2" RadiusX="16" RadiusY="16" Fill="{DynamicResource ShineBrush}" />
<Image Grid.RowSpan="2" x:Name="imageHeaderCtrl" Margin="6" Source="{TemplateBinding Image}" />
<TextBlock Grid.Column="2" x:Name="titleHeaderCtrl" FontWeight="Bold" Margin="0,0,0,1"
Foreground="{DynamicResource TextBrush}" VerticalAlignment="Center" FontSize="15"
Text="{TemplateBinding Title}"
/>
<TextBlock Grid.Column="2" Grid.Row="1" x:Name="contentHeaderCtrl"
Foreground="{DynamicResource TextBrush}" TextWrapping="Wrap" VerticalAlignment="Center"
Text="{TemplateBinding Description}"
/>
<Rectangle Grid.ColumnSpan="3" Grid.Row="2" VerticalAlignment="Stretch"
Fill="{DynamicResource DefaultedBorderBrush}" Visibility="{TemplateBinding HasSeparator }"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
WPF and MVVM fan, I practice C # in all its forms from the beginning of the NET Framework without mentioning C ++ / MFC and other software packages such as databases, ASP, WCF, Web & Windows services, Application, and now Core and UWP.
In my wasted hours, I am guilty of having fathered C.B.R. and its cousins C.B.R. for WinRT and UWP on the Windows store.
But apart from that, I am a great handyman ... the house, a rocket stove to heat the jacuzzi and the last one: a wood oven for pizza, bread, and everything that goes inside
https://guillaumewaser.wordpress.com/
https://fouretcompagnie.wordpress.com/