Blame view
sources/RoboforkApp/Resources/DesignerItem.xaml
2.08 KB
729be9a6d
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:RoboforkApp"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="ResizeChrome.xaml" /> </ResourceDictionary.MergedDictionaries> <ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type s:MoveThumb}"> <Rectangle Fill="Transparent" /> </ControlTemplate> <Style TargetType="{x:Type s:DesignerItem}"> <Setter Property="MinHeight" Value="50" /> <Setter Property="MinWidth" Value="50" /> <Setter Property="SnapsToDevicePixels" Value="true" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type s:DesignerItem}"> <Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=.}"> <s:MoveThumb x:Name="PART_MoveThumb" Cursor="SizeAll" Template="{StaticResource MoveThumbTemplate}" /> <ContentPresenter x:Name="PART_ContentPresenter" Content="{TemplateBinding ContentControl.Content}" Margin="{TemplateBinding Padding}" /> <s:ResizeDecorator x:Name="PART_DesignerItemDecorator" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter TargetName="PART_DesignerItemDecorator" Property="ShowDecorator" Value="True" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> |