Blame view
sources/RoboforkApp/Resources/ResizeChrome.xaml
6.11 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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:RoboforkApp">
<Style TargetType="{x:Type Shape}"
x:Key="ThumbCorner">
<Setter Property="SnapsToDevicePixels"
Value="true" />
<Setter Property="Stroke"
Value="LightSlateGray" />
<Setter Property="StrokeThickness"
Value=".5" />
<Setter Property="Width"
Value="7" />
<Setter Property="Height"
Value="7" />
<Setter Property="Margin"
Value="-2" />
<Setter Property="Fill">
<Setter.Value>
<RadialGradientBrush Center="0.3, 0.3"
GradientOrigin="0.3, 0.3"
RadiusX="0.7"
RadiusY="0.7">
<GradientStop Color="White"
Offset="0" />
<GradientStop Color="DarkSlateGray"
Offset="0.9" />
</RadialGradientBrush>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type s:ResizeChrome}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type s:ResizeChrome}">
<Grid>
<Grid Opacity="0"
Margin="-3">
<s:ResizeThumb Height="3"
Cursor="SizeNS"
VerticalAlignment="Top"
HorizontalAlignment="Stretch" />
<s:ResizeThumb Width="3"
Cursor="SizeWE"
VerticalAlignment="Stretch"
HorizontalAlignment="Left" />
<s:ResizeThumb Width="3"
Cursor="SizeWE"
VerticalAlignment="Stretch"
HorizontalAlignment="Right" />
<s:ResizeThumb Height="3"
Cursor="SizeNS"
VerticalAlignment="Bottom"
HorizontalAlignment="Stretch" />
<s:ResizeThumb Width="7"
Height="7"
Margin="-2"
Cursor="SizeNWSE"
VerticalAlignment="Top"
HorizontalAlignment="Left" />
<s:ResizeThumb Width="7"
Height="7"
Margin="-2"
Cursor="SizeNESW"
VerticalAlignment="Top"
HorizontalAlignment="Right" />
<s:ResizeThumb Width="7"
Height="7"
Margin="-2"
Cursor="SizeNESW"
VerticalAlignment="Bottom"
HorizontalAlignment="Left" />
<s:ResizeThumb Width="7"
Height="7"
Margin="-2"
Cursor="SizeNWSE"
VerticalAlignment="Bottom"
HorizontalAlignment="Right" />
</Grid>
<Grid IsHitTestVisible="False"
Opacity="1"
Margin="-3">
<Rectangle SnapsToDevicePixels="True"
StrokeThickness="1"
Margin="1">
<Rectangle.Stroke>
<LinearGradientBrush StartPoint="0, 0"
EndPoint="1, .3"
Opacity=".7">
<GradientStop Color="SlateGray"
Offset="0" />
<GradientStop Color="LightGray"
Offset=".5" />
<GradientStop Color="SlateGray"
Offset="1" />
</LinearGradientBrush>
</Rectangle.Stroke>
</Rectangle>
<Ellipse Style="{StaticResource ThumbCorner}"
HorizontalAlignment="Left"
VerticalAlignment="Top" />
<Ellipse Style="{StaticResource ThumbCorner}"
HorizontalAlignment="Right"
VerticalAlignment="Top" />
<Ellipse Style="{StaticResource ThumbCorner}"
HorizontalAlignment="Left"
VerticalAlignment="Bottom" />
<Ellipse Style="{StaticResource ThumbCorner}"
HorizontalAlignment="Right"
VerticalAlignment="Bottom" />
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|