mirror of
https://github.com/VitalickS/BrightSharp.Toolkit.git
synced 2026-03-21 02:21:15 +00:00
Initial
This commit is contained in:
43
BrightSharp/Diagrams/Resources/DesignerItem.xaml
Normal file
43
BrightSharp/Diagrams/Resources/DesignerItem.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:Diagrams">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="SizeChrome.xaml"/>
|
||||
<ResourceDictionary Source="ResizeRotateChrome.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type s:MoveThumb}">
|
||||
<Rectangle Fill="Transparent"/>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="DesignerItemStyle" TargetType="ContentControl">
|
||||
<Setter Property="MinHeight" Value="26"/>
|
||||
<Setter Property="MinWidth" Value="30"/>
|
||||
<Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
|
||||
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="MaxHeight" Value="900" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
|
||||
<Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
|
||||
<s:MoveThumb Focusable="False" Cursor="SizeAll" Template="{StaticResource MoveThumbTemplate}" />
|
||||
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"
|
||||
Margin="{TemplateBinding Padding}"/>
|
||||
<s:DesignerItemDecorator x:Name="ItemDecorator" Focusable="False"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Selector.IsSelected" Value="True">
|
||||
<Setter TargetName="ItemDecorator" Property="ShowDecorator" Value="True" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user