|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ControlTemplate x:Key="DockPaneTemplate"
TargetType="{x:Type HeaderedContentControl}">
<DockPanel>
<Border x:Name="PART_DOCK_PANE_HEADER"
DockPanel.Dock="Top"
BorderThickness="0"
CornerRadius="2,2,0,0"
Background="{TemplateBinding Background}">
<DockPanel>
<Button x:Name="PART_CLOSE"
DockPanel.Dock="Right"
Style="{DynamicResource DockPaneButton}"
Margin="0,0,4,0"
VerticalAlignment="Center">
<Path Height="16"
Width="16"
Data="M4,4 L12,12 M12,4 L4,12"
Stroke="{DynamicResource DockPaneHeaderForegroundBrush}" />
</Button>
<ToggleButton x:Name="PART_PIN"
DockPanel.Dock="Right"
Style="{DynamicResource DockPaneButton}"
Margin="0,0,4,0"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5"
RenderTransform="{x:Null}">
<Path Height="16"
Width="16"
Data="M6,4 L10,4 10,10 6,10z M4,11 L12,11 M8,10 L8,14 M9,4 L9,10"
Stroke="{DynamicResource DockPaneHeaderForegroundBrush}" />
</ToggleButton>
<Button x:Name="PART_DOCK_PANE_MENU"
DockPanel.Dock="Right"
Style="{DynamicResource DockPaneButton}"
Margin="0,0,4,0"
VerticalAlignment="Center">
<Path Fill="{DynamicResource DockPaneHeaderForegroundBrush}"
Height="16"
Width="16"
Data="M4,6 L12,6 8,10 z" />
</Button>
<ContentPresenter Margin="4"
TextElement.Foreground="{DynamicResource DockPaneHeaderForegroundBrush}"
VerticalAlignment="Center"
ContentSource="Header">
<ContentPresenter.Resources>
<Style TargetType="{x:Type TextBlock}"
BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="TextTrimming"
Value="CharacterEllipsis" />
</Style>
</ContentPresenter.Resources>
</ContentPresenter>
</DockPanel>
</Border>
<Border BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}">
<ContentPresenter />
</Border>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger SourceName="PART_PIN"
Property="IsChecked"
Value="True">
<Setter Property="RenderTransform"
TargetName="PART_PIN">
<Setter.Value>
<RotateTransform Angle="90" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</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.
Ashish worked for Microsoft for a number of years in Microsoft Visual Studio (Architect edition) and Windows Live division as a developer. Before that he was a developer consultant mainly involved in distributed service development / architecture. His main interests are distributed software architecture, patterns and practices and mobile device development.
Currently Ashish serves as a Technical Lead at RIM leading next generation BlackBerry media experience and also runs his own company MixModes Inc. specializing in .NET / WPF / Silverlight technologies. You can visit MixModes at http://mixmodes.com or follow it on Twitter @MixModes
In his free time he is an avid painter, hockey player and enjoys travelling. His blog is at: http://ashishkaila.serveblog.net