You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
699 lines
37 KiB
699 lines
37 KiB
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
xmlns:Controls="clr-namespace:ICSharpCode.WpfDesign.Designer.Controls" |
|
xmlns:ControlConvertors="clr-namespace:ICSharpCode.WpfDesign.Designer.Controls.Converters" |
|
xmlns:Converters="clr-namespace:ICSharpCode.WpfDesign.Designer.Converters" |
|
xmlns:Widgets="http://icsharpcode.net/sharpdevelop/widgets"> |
|
<!-- |
|
This file contains the default styles used by the Controls in ICSharpCode.WpfDesign.Designer.Controls |
|
--> |
|
<Converters:LevelConverter x:Key="FormatDoubleConverter" /> |
|
<ControlConvertors:HandleLengthWithOffset x:Key="HandleLengthWithOffset" /> |
|
<SolidColorBrush Color="#FF474747" x:Key="HandleBrush" /> |
|
<Style TargetType="{x:Type Controls:PanelMoveAdorner}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:PanelMoveAdorner}"> |
|
<Border BorderThickness="4" Margin="-2" BorderBrush="Transparent" Cursor="SizeAll" /> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:EnumButton}" BasedOn="{StaticResource {x:Type ToggleButton}}"> |
|
<Setter Property="Margin" Value="3 3 0 3" /> |
|
<Setter Property="Foreground" Value="#FF000000"/> |
|
<Setter Property="Padding" Value="0"/> |
|
<Setter Property="BorderThickness" Value="1"/> |
|
<Setter Property="BorderBrush" Value="Black"/> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="ToggleButton"> |
|
<Grid> |
|
<Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}"> |
|
<Grid Background="{TemplateBinding Background}"> |
|
<Border Opacity="0" x:Name="BackgroundAnimation" Background="#FF448DCA" /> |
|
</Grid> |
|
</Border> |
|
<ContentPresenter |
|
x:Name="contentPresenter" |
|
Content="{TemplateBinding Content}" |
|
ContentTemplate="{TemplateBinding ContentTemplate}" |
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
Margin="{TemplateBinding Padding}"/> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
<Style.Triggers> |
|
<Trigger Property="IsChecked" Value="True"> |
|
<Setter Property="Background" Value="SkyBlue" /> |
|
</Trigger> |
|
</Style.Triggers> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:DesignerThumb}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:DesignerThumb}"> |
|
<Grid> |
|
<Rectangle Name="thumbRectangle" SnapsToDevicePixels="True" Stroke="Black" Fill="White" RadiusX="1.414" RadiusY="1.414" /> |
|
<Menu Height="15" HorizontalAlignment="Left" Margin="0,-19,-19,0" VerticalAlignment="Top" Width="15" BorderThickness="0" Background="Transparent" Visibility="{Binding Path=OperationMenu, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:CollapsedWhenNull.Instance}}" > |
|
<MenuItem Height="15" Width="15" Padding="0" Background="Transparent" BorderThickness="1" ItemsSource="{TemplateBinding OperationMenu}"> |
|
<MenuItem.Header> |
|
<Path Data="M3.5,5.5 L11.5,5.5 L7.5,11 z" Fill="Black" Stroke="Gray" StrokeThickness="1" /> |
|
</MenuItem.Header> |
|
</MenuItem> |
|
</Menu> |
|
</Grid> |
|
<ControlTemplate.Triggers> |
|
<Trigger Property="IsPrimarySelection" Value="False"> |
|
<Setter TargetName="thumbRectangle" Property="Stroke" Value="White" /> |
|
<Setter TargetName="thumbRectangle" Property="Fill" Value="Black" /> |
|
</Trigger> |
|
<Trigger Property="IsEnabled" Value="False"> |
|
<Setter TargetName="thumbRectangle" Property="Fill" Value="Gray" /> |
|
</Trigger> |
|
<Trigger Property="ThumbVisible" Value="False"> |
|
<Setter TargetName="thumbRectangle" Property="Visibility" Value="Hidden" /> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:PointThumb}"> |
|
<Setter Property="Foreground" Value="Black" /> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:PointThumb}"> |
|
<Grid Margin="-3.5,-3.5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"> |
|
<Grid.Resources> |
|
<Converters:DoubleOffsetConverter x:Key="PointOffset" Offset="3.5" /> |
|
</Grid.Resources> |
|
<Line HorizontalAlignment="Left" VerticalAlignment="Top" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" StrokeDashArray="2 2" X1="3.5" Y1="3.5" X2="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource PointOffset}, Path=RelativeToPoint.X}" Y2="{Binding RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource PointOffset}, Path=RelativeToPoint.Y}" Visibility="{Binding Path=RelativeToPoint, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:CollapsedWhenNull.Instance}}" /> |
|
<Grid Width="7" Height="7" HorizontalAlignment="Left" VerticalAlignment="Top"> |
|
<Grid.Resources> |
|
<Style TargetType="MenuItem"> |
|
<Setter Property="HorizontalContentAlignment" Value="Left" /> |
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
</Style> |
|
</Grid.Resources> |
|
<Rectangle HorizontalAlignment="Left" VerticalAlignment="Top" Width="7" Height="7" Name="thumbRectangle" SnapsToDevicePixels="True" Stroke="{TemplateBinding Foreground}" Fill="White" RadiusX="1.414" RadiusY="1.414" /> |
|
<Ellipse HorizontalAlignment="Left" VerticalAlignment="Top" Width="7" Height="7" Name="thumbElipse" Stroke="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Fill="White" Visibility="Collapsed" /> |
|
<Menu Foreground="Black" Height="15" HorizontalAlignment="Left" Margin="0,-19,-19,0" VerticalAlignment="Top" Width="15" BorderThickness="0" Background="Transparent" Visibility="{Binding Path=OperationMenu, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:CollapsedWhenNull.Instance}}" > |
|
<MenuItem RenderTransform="{TemplateBinding InnerRenderTransform}" Height="15" Width="15" Padding="0" Background="Transparent" BorderThickness="1" ItemsSource="{TemplateBinding OperationMenu}"> |
|
<MenuItem.Header> |
|
<Path Data="M3.5,5.5 L11.5,5.5 L7.5,11 z" Fill="Black" Stroke="Gray" StrokeThickness="1" /> |
|
</MenuItem.Header> |
|
</MenuItem> |
|
</Menu> |
|
</Grid> |
|
</Grid> |
|
<ControlTemplate.Triggers> |
|
<Trigger Property="IsPrimarySelection" Value="False"> |
|
<Setter TargetName="thumbRectangle" Property="Stroke" Value="White" /> |
|
<Setter TargetName="thumbRectangle" Property="Fill" Value="Black" /> |
|
<Setter TargetName="thumbElipse" Property="Fill" Value="Black" /> |
|
</Trigger> |
|
<Trigger Property="IsEnabled" Value="False"> |
|
<Setter TargetName="thumbRectangle" Property="Fill" Value="Gray" /> |
|
</Trigger> |
|
<Trigger Property="IsEllipse" Value="True"> |
|
<Setter TargetName="thumbRectangle" Property="Visibility" Value="Hidden" /> |
|
<Setter TargetName="thumbElipse" Property="Visibility" Value="Visible" /> |
|
</Trigger> |
|
<Trigger Property="ThumbVisible" Value="False"> |
|
<Setter TargetName="thumbRectangle" Property="Visibility" Value="Hidden" /> |
|
<Setter TargetName="thumbElipse" Property="Visibility" Value="Hidden" /> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:RotateThumb}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:RotateThumb}"> |
|
<Grid> |
|
<Rectangle VerticalAlignment="Top" Width="2" Height="30" Fill="Black" Margin="0,0,0,0" /> |
|
<Ellipse VerticalAlignment="Top" StrokeThickness="1" Name="thumbRectangle" SnapsToDevicePixels="True" Stroke="Black" |
|
Width="7" Height="7" Fill="Black"> |
|
</Ellipse> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:SelectionFrame}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:SelectionFrame}"> |
|
<Rectangle Fill="#519ABFE5" Stroke="#FF7A8787" StrokeThickness="1" /> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:ContainerDragHandle}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:ContainerDragHandle}"> |
|
<Canvas Height="13" Width="13" Name="Canvas" SnapsToDevicePixels="True"> |
|
<Rectangle Height="13" Width="13" RadiusX="2" RadiusY="2" Fill="#889ABFE5" Name="BorderRectangle" Stroke="#FF7A8FB5" StrokeThickness="1" /> |
|
<Path Fill="#FF748EAA" Canvas.Left="1" Canvas.Top="1"> |
|
<Path.Data> |
|
<GeometryGroup> |
|
<PathGeometry Figures="M5.5,0L3,3L8,3 M11,5.5L8,3L8,8 M5.5,11L3,8L8,8 M0,5.5L3,3L3,8" /> |
|
<RectangleGeometry Rect="3,5,5,1" /> |
|
<RectangleGeometry Rect="5,3,1,5" /> |
|
<RectangleGeometry Rect="5,5,1,1" /> |
|
</GeometryGroup> |
|
</Path.Data> |
|
</Path> |
|
</Canvas> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:WindowClone}"> |
|
<Setter Property="Width" Value="640" /> |
|
<Setter Property="Height" Value="480" /> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:WindowClone}"> |
|
<Border Background="{DynamicResource {x:Static SystemColors.GradientActiveCaptionBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1,1,1,1"> |
|
<DockPanel Margin="4,0,4,4"> |
|
<DockPanel Height="26" DockPanel.Dock="Top"> |
|
<Image Width="16" Height="16" Margin="1,0,0,0" Source="/ICSharpCode.WpfDesign.Designer;component/Images/Icons.32x32.EmptyProjectIcon.png" Visibility="{Binding Path=(Window.Icon), RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:CollapsedWhenNotNull.Instance}}" /> |
|
<Image Width="16" Height="16" Margin="1,0,0,0" Source="{TemplateBinding Window.Icon}" Visibility="{Binding Path=(Window.Icon), RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:CollapsedWhenZero.Instance}}" /> |
|
<Button Content="r" FontFamily="Marlett" Name="CloseButton" VerticalAlignment="Top" Width="43" Height="17" DockPanel.Dock="Right" /> |
|
<Button Content="1" FontFamily="Marlett" Name="MinimizeButton" VerticalAlignment="Top" Width="25" Height="17" DockPanel.Dock="Right" Visibility="{Binding Path=(Window.ResizeMode), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:EnumCollapsed.Instance}, ConverterParameter=NoResize}" /> |
|
<Button Content="0" FontFamily="Marlett" Name="MaximiseButton" VerticalAlignment="Top" Width="25" Height="17" DockPanel.Dock="Right" Visibility="{Binding Path=(Window.ResizeMode), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static Converters:EnumCollapsed.Instance}, ConverterParameter=NoResize}" /> |
|
<Label Margin="4,0,0,0" Content="{TemplateBinding Window.Title}" /> |
|
</DockPanel> |
|
<Border Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"> |
|
<Border ClipToBounds="True" BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}" Background="{TemplateBinding Panel.Background}"> |
|
<AdornerDecorator> |
|
<ContentPresenter ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Content="{TemplateBinding ContentControl.Content}" /> |
|
</AdornerDecorator> |
|
</Border> |
|
</Border> |
|
</DockPanel> |
|
</Border> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:ErrorBalloon}"> |
|
<Setter Property="WindowStyle" Value="None" /> |
|
<Setter Property="AllowsTransparency" Value="True" /> |
|
<Setter Property="SizeToContent" Value="WidthAndHeight" /> |
|
<Setter Property="ShowInTaskbar" Value="False" /> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:ErrorBalloon}"> |
|
<Grid x:Name="LayoutRoot"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<Rectangle RadiusX="10" RadiusY="10" Margin="12,36,4,4"> |
|
<Rectangle.Fill> |
|
<SolidColorBrush Color="#41626262" /> |
|
</Rectangle.Fill> |
|
</Rectangle> |
|
<Border Margin="8,32,8,8" Background="{DynamicResource {x:Static SystemColors.InfoBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1,1,1,1" CornerRadius="10,10,10,10" Padding="10,10,10,10"> |
|
<Border BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}" Background="{TemplateBinding Panel.Background}"> |
|
<AdornerDecorator> |
|
<ContentPresenter ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Content="{TemplateBinding ContentControl.Content}" /> |
|
</AdornerDecorator> |
|
</Border> |
|
</Border> |
|
<Path Fill="{DynamicResource {x:Static SystemColors.InfoBrushKey}}" Stretch="Fill" HorizontalAlignment="Left" Margin="34.75,9.25,0,0" VerticalAlignment="Top" Width="15.25" Height="24.5" Data="M34.75,33.75 L40.5,9.25 50,33.5 z" /> |
|
<Path Stretch="Fill" Stroke="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" HorizontalAlignment="Left" Margin="34.5,9.25,0,0" VerticalAlignment="Top" Width="16" Height="24" Data="M35,32.75 L40.5,9.25 50,32.75" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:GridRowSplitterAdorner}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:GridRowSplitterAdorner}"> |
|
<Grid Height="{x:Static Controls:GridRailAdorner.SplitterWidth}"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="10" /> |
|
<!-- 10=RailSize --> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<!-- put a transparent rectangle in the rail so the user does not have to hit the small railHandle --> |
|
<Rectangle Fill="Transparent" /> |
|
<Path Name="railHandle" Fill="#FFE6E6FF" Stretch="Fill" Stroke="DodgerBlue" Data="M0,0 L0,1 1,0.5 z" /> |
|
<Path Name="line" Stretch="Fill" Stroke="DodgerBlue" Grid.Column="2" Margin="-1 0 0 0" Data="M0,0.5 L1,0.5" /> |
|
</Grid> |
|
<ControlTemplate.Triggers> |
|
<Trigger Property="IsMouseOver" Value="True"> |
|
<Setter TargetName="railHandle" Property="Fill" Value="#FFFFB74F" /> |
|
</Trigger> |
|
<Trigger Property="IsPreview" Value="True"> |
|
<Setter TargetName="railHandle" Property="Stroke" Value="#D0FFB74F" /> |
|
<Setter TargetName="line" Property="Stroke" Value="#D0FFB74F" /> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:GridColumnSplitterAdorner}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:GridColumnSplitterAdorner}"> |
|
<Grid Width="{x:Static Controls:GridRailAdorner.SplitterWidth}"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="10" /> |
|
<!-- 10=RailSize --> |
|
<RowDefinition Height="*" /> |
|
</Grid.RowDefinitions> |
|
<!-- put a transparent rectangle in the rail so the user does not have to hit the small railHandle --> |
|
<Rectangle Fill="Transparent" /> |
|
<Path Name="railHandle" Fill="#FFE6E6FF" Stretch="Fill" Stroke="DodgerBlue" Data="M0,0 L1,0 0.5,1 z" /> |
|
<Path Name="line" Stretch="Fill" Stroke="DodgerBlue" Grid.Row="2" Margin="0 -1 0 0" Data="M0.5,0 L0.5,1" /> |
|
</Grid> |
|
<ControlTemplate.Triggers> |
|
<Trigger Property="IsMouseOver" Value="True"> |
|
<Setter TargetName="railHandle" Property="Fill" Value="#FFFFB74F" /> |
|
</Trigger> |
|
<Trigger Property="IsPreview" Value="True"> |
|
<Setter TargetName="railHandle" Property="Stroke" Value="#D0FFB74F" /> |
|
<Setter TargetName="line" Property="Stroke" Value="#D0FFB74F" /> |
|
</Trigger> |
|
</ControlTemplate.Triggers> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:CanvasPositionHandle}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:MarginHandle}"> |
|
<Grid Height="10" Width="{Binding Path=HandleLength, Converter={x:Static ControlConvertors:HandleLengthWithOffset.Instance}, RelativeSource={RelativeSource Mode=TemplatedParent}}" SnapsToDevicePixels="True"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="8" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<Path Name="startArrow" Fill="{StaticResource HandleBrush}" Stretch="Fill" Stroke="{TemplateBinding Panel.Background}" StrokeThickness="0.5" Margin="0,1,0,1" Data="M0,0 L0,1 1,0.5 z" Grid.Column="0" /> |
|
<!-- Wrap the handle-line and endArrow in this grid. It's visiblity is subjected to HandleLength --> |
|
<Grid Height="10" Grid.Column="1" Name="lineArrow"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition MaxWidth="20" MinWidth="10" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<Rectangle Fill="Transparent" Height="10" Grid.Column="0" Grid.ColumnSpan="4" /> |
|
<Path Name="line1" StrokeDashArray="2,2" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="0" /> |
|
<TextBlock Grid.Column="1" Text="{Binding Path=HandleLength, Mode=OneWay, Converter={x:Static Converters:FormatDoubleConverter.Instance }, RelativeSource={RelativeSource Mode=TemplatedParent}}" FontSize="9" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="1,1,1,1"> |
|
<TextBlock.LayoutTransform> |
|
<RotateTransform Angle="{Binding Path=TextTransform, RelativeSource={RelativeSource Mode=TemplatedParent}}" CenterX="0.5" CenterY="0.5"> |
|
</RotateTransform> |
|
</TextBlock.LayoutTransform> |
|
</TextBlock> |
|
<Path Name="line2" StrokeDashArray="2,2" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="2" /> |
|
<!--<Path Name="arrow2" Margin="0,1,0,1" Fill="{StaticResource HandleBrush}" Stretch="Fill" Stroke="{TemplateBinding Panel.Background}" StrokeThickness="0.5" Data="M0,0 L0,1 1,0.5 z" Grid.Column="3" />--> |
|
<!--<Rectangle Width="1.5" Fill="{StaticResource HandleBrush}" Grid.Column="4"/>--> |
|
</Grid> |
|
<!-- Rotate the handle and angle of rotation being set by the Margin type. See enum HandleOrientation --> |
|
<Grid.LayoutTransform> |
|
<RotateTransform Angle="{Binding Path=Angle, RelativeSource={RelativeSource Mode=TemplatedParent}}"> |
|
</RotateTransform> |
|
</Grid.LayoutTransform> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:MarginHandle}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:MarginHandle}"> |
|
<Grid Height="10" Width="{Binding Path=HandleLength, Converter={x:Static ControlConvertors:HandleLengthWithOffset.Instance}, RelativeSource={RelativeSource Mode=TemplatedParent}}" SnapsToDevicePixels="True"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="8" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
<Path Name="startArrow" Fill="{StaticResource HandleBrush}" Stretch="Fill" Stroke="{TemplateBinding Panel.Background}" StrokeThickness="0.5" Margin="0,1,0,1" Data="M0,0 L0,1 1,0.5 z" Grid.Column="0" /> |
|
<!-- Wrap the handle-line and endArrow in this grid. It's visiblity is subjected to HandleLength --> |
|
<Grid Height="10" Grid.Column="1" Name="lineArrow"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition MaxWidth="20" MinWidth="10" /> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="8" /> |
|
<ColumnDefinition Width="1.5"/> |
|
</Grid.ColumnDefinitions> |
|
<Rectangle Fill="Transparent" Height="10" Grid.Column="0" Grid.ColumnSpan="4" /> |
|
<Path Name="line1" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="0" /> |
|
<TextBlock Grid.Column="1" Text="{Binding Path=HandleLength, Mode=OneWay, Converter={x:Static Converters:FormatDoubleConverter.Instance }, RelativeSource={RelativeSource Mode=TemplatedParent}}" FontSize="9" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="1,1,1,1"> |
|
<TextBlock.LayoutTransform> |
|
<RotateTransform Angle="{Binding Path=TextTransform, RelativeSource={RelativeSource Mode=TemplatedParent}}" CenterX="0.5" CenterY="0.5"> |
|
</RotateTransform> |
|
</TextBlock.LayoutTransform> |
|
</TextBlock> |
|
<Path Name="line2" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="2" /> |
|
<Path Name="arrow2" Margin="0,1,0,1" Fill="{StaticResource HandleBrush}" Stretch="Fill" Stroke="{TemplateBinding Panel.Background}" StrokeThickness="0.5" Data="M0,0 L0,1 1,0.5 z" Grid.Column="3" /> |
|
<Rectangle Width="1.5" Fill="{StaticResource HandleBrush}" Grid.Column="4"/> |
|
</Grid> |
|
<!-- Rotate the handle and angle of rotation being set by the Margin type. See enum HandleOrientation --> |
|
<Grid.LayoutTransform> |
|
<RotateTransform Angle="{Binding Path=Angle, RelativeSource={RelativeSource Mode=TemplatedParent}}"> |
|
</RotateTransform> |
|
</Grid.LayoutTransform> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:MarginStub}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:MarginStub}"> |
|
<Grid SnapsToDevicePixels="True" Height="10" Width="10"> |
|
<Rectangle Fill="Transparent" /> |
|
<Ellipse Fill="{TemplateBinding Panel.Background}" Height="7" Width="7" StrokeThickness="1" Stroke="{StaticResource HandleBrush}" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:HeightDisplay}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:HeightDisplay}"> |
|
<Grid Width="22"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*" /> |
|
<RowDefinition MaxHeight="20" MinHeight="5" /> |
|
<RowDefinition Height="5" /> |
|
</Grid.RowDefinitions> |
|
<Path SnapsToDevicePixels="True" Grid.Row="0" Stroke="#AC0000" StrokeThickness="1.0" Data="M0,0 L1,0 M0.75,0 L0.75,1" Stretch="Fill" /> |
|
<TextBlock HorizontalAlignment="Center" Margin="8,0,0,1" Padding="1,1,1,1" FontSize="10" Grid.Row="1"> |
|
<TextBlock.Text> |
|
<MultiBinding Converter="{x:Static Converters:ControlToRealHeightConverter.Instance}" StringFormat="0"> |
|
<MultiBinding.Bindings> |
|
<Binding /> |
|
<Binding Path="ActualHeight" UpdateSourceTrigger="PropertyChanged" /> |
|
<Binding Path="Height" UpdateSourceTrigger="PropertyChanged" /> |
|
</MultiBinding.Bindings> |
|
</MultiBinding> |
|
</TextBlock.Text> |
|
<TextBlock.LayoutTransform> |
|
<RotateTransform Angle="270" CenterX="0.5" CenterY="0.5" /> |
|
</TextBlock.LayoutTransform> |
|
</TextBlock> |
|
<Path SnapsToDevicePixels="True" Grid.Row="2" Stroke="#AC0000" StrokeThickness="1.0" Data="M0.75,0 L0.75,3 M0,3 L1,3 " Stretch="Fill" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:WidthDisplay}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:WidthDisplay}"> |
|
<Grid Height="22" SnapsToDevicePixels="True"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition MaxWidth="20" MinWidth="5" /> |
|
<ColumnDefinition Width="5" /> |
|
</Grid.ColumnDefinitions> |
|
<Path Grid.Column="0" Stroke="#AC0000" StrokeThickness="1" Data="M0,0 L0,1 M0,0.75 L1,0.75" Stretch="Fill" SnapsToDevicePixels="True" /> |
|
<TextBlock HorizontalAlignment="Center" Margin="0,8,0,0" Padding="1,1,1,1" FontSize="10" Grid.Column="1"> |
|
<TextBlock.Text> |
|
<MultiBinding Converter="{x:Static Converters:ControlToRealWidthConverter.Instance}" StringFormat="0"> |
|
<MultiBinding.Bindings> |
|
<Binding /> |
|
<Binding Path="ActualWidth" UpdateSourceTrigger="PropertyChanged" /> |
|
<Binding Path="Width" UpdateSourceTrigger="PropertyChanged" /> |
|
</MultiBinding.Bindings> |
|
</MultiBinding> |
|
</TextBlock.Text> |
|
</TextBlock> |
|
<Path Grid.Column="2" Stroke="#AC0000" StrokeThickness="1" Data="M0,0.75 L3,0.75 M3,0 L3,1 " Stretch="Fill" SnapsToDevicePixels="True" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:InPlaceEditor}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:InPlaceEditor}"> |
|
<TextBox Name="editor" SnapsToDevicePixels="True" Padding="{Binding Path=Padding}" FontSize="{Binding Path=FontSize}" FontFamily="{Binding Path=FontFamily}" FontStyle="{Binding Path=FontStyle}" FontStretch="{Binding Path=FontStretch}" FontWeight="{Binding Path=FontWeight}" Text="{Binding Path=Bind, RelativeSource={RelativeSource Mode=TemplatedParent}, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" /> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:QuickOperationMenu}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:QuickOperationMenu}"> |
|
<Menu Height="15" HorizontalAlignment="Left" Name="menu1" VerticalAlignment="Top" Width="15" BorderThickness="0" Background="Transparent"> |
|
<MenuItem Height="15" Width="15" Padding="0" Background="Transparent" BorderThickness="1" Name="MainHeader"> |
|
<MenuItem.Header> |
|
<Path Data="M3.5,5.5 L11.5,5.5 L7.5,11 z" Fill="Black" Stroke="Gray" StrokeThickness="1" /> |
|
</MenuItem.Header> |
|
</MenuItem> |
|
</Menu> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:ZoomControl}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:ZoomControl}"> |
|
<Grid Background="{TemplateBinding Panel.Background}"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="Auto" /> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="*" /> |
|
<RowDefinition Height="Auto" /> |
|
</Grid.RowDefinitions> |
|
<Widgets:SelfCollapsingPanel Grid.Column="0" Grid.Row="1" CollapseOrientation="Horizontal" CanCollapse="{Binding Path=ComputedZoomButtonCollapsed, Mode=OneWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"> |
|
<Widgets:ZoomButtons x:Name="zoomButtons" Value="{Binding Path=CurrentZoom, RelativeSource={RelativeSource Mode=TemplatedParent}}" Minimum="{TemplateBinding MinimumZoom}" Maximum="{TemplateBinding MaximumZoom}" /> |
|
</Widgets:SelfCollapsingPanel> |
|
<Rectangle Grid.Column="2" Grid.Row="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" /> |
|
<ScrollContentPresenter Name="PART_Presenter" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Margin="{TemplateBinding Control.Padding}" Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"> |
|
<ScrollContentPresenter.LayoutTransform> |
|
<ScaleTransform ScaleX="{Binding Path=CurrentZoom, RelativeSource={RelativeSource Mode=TemplatedParent}}" ScaleY="{Binding Path=CurrentZoom, RelativeSource={RelativeSource Mode=TemplatedParent}}"/> |
|
</ScrollContentPresenter.LayoutTransform> |
|
</ScrollContentPresenter> |
|
<ContentControl Grid.Column="1" Grid.Row="1" Content="{TemplateBinding AdditionalControls}" /> |
|
<ScrollBar Name="PART_VerticalScrollBar" Grid.Column="3" Grid.Row="0" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" ViewportSize="{TemplateBinding ViewportHeight}" Value="{TemplateBinding VerticalOffset}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" /> |
|
<ScrollBar Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Column="2" Grid.Row="1" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" ViewportSize="{TemplateBinding ViewportWidth}" Value="{TemplateBinding HorizontalOffset}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Button}" x:Key="ClearButtonStyle"> |
|
<Setter Property="Background" Value="#FFaaaaaa" /> |
|
<Setter Property="BorderBrush" Value="#FFaaaaaa" /> |
|
<Setter Property="Foreground" Value="White" /> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="Button"> |
|
<Grid Width="14" Height="14"> |
|
<VisualStateManager.VisualStateGroups> |
|
<VisualStateGroup x:Name="FocusStates"> |
|
<VisualState x:Name="Focused" /> |
|
<VisualState x:Name="Unfocused" /> |
|
</VisualStateGroup> |
|
<VisualStateGroup x:Name="CommonStates"> |
|
<VisualStateGroup.Transitions> |
|
<VisualTransition GeneratedDuration="00:00:00.2000000" /> |
|
</VisualStateGroup.Transitions> |
|
<VisualState x:Name="Normal" /> |
|
<VisualState x:Name="MouseOver"> |
|
<Storyboard> |
|
<DoubleAnimation Duration="0" |
|
Storyboard.TargetName="ellipseHighlight" |
|
Storyboard.TargetProperty="(UIElement.Opacity)" |
|
To="1" /> |
|
</Storyboard> |
|
</VisualState> |
|
<VisualState x:Name="Pressed"> |
|
<Storyboard> |
|
<DoubleAnimation Duration="0" |
|
Storyboard.TargetName="ellipseHighlight" |
|
Storyboard.TargetProperty="(UIElement.Opacity)" |
|
To="1" /> |
|
<DoubleAnimation Duration="0" |
|
Storyboard.TargetName="pathHighlight" |
|
Storyboard.TargetProperty="(UIElement.Opacity)" |
|
To="1" /> |
|
</Storyboard> |
|
</VisualState> |
|
<VisualState x:Name="Disabled" /> |
|
</VisualStateGroup> |
|
</VisualStateManager.VisualStateGroups> |
|
<Ellipse x:Name="ellipse" |
|
Fill="{TemplateBinding Background}" |
|
Stroke="{TemplateBinding BorderBrush}" /> |
|
<Ellipse x:Name="ellipseHighlight" |
|
Fill="#FFBD7777" |
|
Opacity="0" |
|
Stroke="Red" /> |
|
<Path x:Name="path" |
|
Margin="4.5" |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Data="M0.5,0.5 L8.5,8.5 M8.5000095,0.50000072 L0.50000954,8.500001" |
|
Stretch="Fill" |
|
Stroke="{TemplateBinding Foreground}" |
|
UseLayoutRounding="False" /> |
|
<Path x:Name="pathHighlight" |
|
Margin="4.5" |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Data="M0.5,0.5 L8.5,8.5 M8.5000095,0.50000072 L0.50000954,8.500001" |
|
Opacity="0" |
|
Stretch="Fill" |
|
Stroke="Red" |
|
UseLayoutRounding="False" /> |
|
<ContentPresenter x:Name="contentPresenter" |
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
Visibility="Collapsed" /> |
|
<Rectangle x:Name="DisabledVisualElement" |
|
Fill="#FFFFFFFF" |
|
IsHitTestVisible="false" |
|
Opacity="0" |
|
RadiusX="3" |
|
RadiusY="3" /> |
|
<Rectangle x:Name="FocusVisualElement" |
|
Margin="1" |
|
IsHitTestVisible="false" |
|
Opacity="0" |
|
RadiusX="2" |
|
RadiusY="2" |
|
Stroke="#FF6DBDD1" |
|
StrokeThickness="1" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:ClearableTextBox}"> |
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" /> |
|
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" /> |
|
<Setter Property="BorderBrush" Value="#888" /> |
|
<Setter Property="BorderThickness" Value="1" /> |
|
<Setter Property="Padding" Value="1,0,0,0" /> |
|
<Setter Property="AllowDrop" Value="true" /> |
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
|
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" /> |
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" /> |
|
<Setter Property="VerticalContentAlignment" Value="Center" /> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:ClearableTextBox}"> |
|
<Grid> |
|
<VisualStateManager.VisualStateGroups> |
|
<VisualStateGroup x:Name="TextRemoverStates"> |
|
<VisualStateGroup.Transitions> |
|
<VisualTransition GeneratedDuration="00:00:00.3000000" /> |
|
</VisualStateGroup.Transitions> |
|
<VisualState x:Name="TextRemoverVisible"> |
|
<Storyboard> |
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
|
Duration="00:00:00.0010000" |
|
Storyboard.TargetName="TextRemover" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"> |
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" /> |
|
</DoubleAnimationUsingKeyFrames> |
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
|
Duration="00:00:00.0010000" |
|
Storyboard.TargetName="TextRemover" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"> |
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" /> |
|
</DoubleAnimationUsingKeyFrames> |
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
|
Duration="00:00:00.0010000" |
|
Storyboard.TargetName="TextRemover" |
|
Storyboard.TargetProperty="(UIElement.Opacity)"> |
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" /> |
|
</DoubleAnimationUsingKeyFrames> |
|
</Storyboard> |
|
</VisualState> |
|
<VisualState x:Name="TextRemoverHidden"> |
|
<Storyboard> |
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
|
Duration="00:00:00.0010000" |
|
Storyboard.TargetName="TextRemover" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"> |
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" /> |
|
</DoubleAnimationUsingKeyFrames> |
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
|
Duration="00:00:00.0010000" |
|
Storyboard.TargetName="TextRemover" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"> |
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" /> |
|
</DoubleAnimationUsingKeyFrames> |
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
|
Duration="00:00:00.0010000" |
|
Storyboard.TargetName="TextRemover" |
|
Storyboard.TargetProperty="(UIElement.Opacity)"> |
|
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" /> |
|
</DoubleAnimationUsingKeyFrames> |
|
</Storyboard> |
|
</VisualState> |
|
</VisualStateGroup> |
|
</VisualStateManager.VisualStateGroups> |
|
<Border x:Name="Border" |
|
Background="{TemplateBinding Background}" |
|
BorderBrush="{TemplateBinding BorderBrush}" |
|
BorderThickness="{TemplateBinding BorderThickness}" |
|
CornerRadius="1" /> |
|
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" |
|
Margin="0,0,18,0" |
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
|
<Viewbox Stretch="Uniform" HorizontalAlignment="Right" VerticalAlignment="Stretch" Margin="0,3,3,3"> |
|
<Button x:Name="TextRemover" |
|
Width="14" |
|
Height="14" |
|
HorizontalAlignment="Stretch" |
|
VerticalAlignment="Stretch" |
|
IsTabStop="False" |
|
RenderTransformOrigin="0.5,0.5" |
|
Style="{StaticResource ClearButtonStyle}"> |
|
<Button.RenderTransform> |
|
<TransformGroup> |
|
<ScaleTransform ScaleX="1" ScaleY="1" /> |
|
<SkewTransform /> |
|
<RotateTransform /> |
|
<TranslateTransform /> |
|
</TransformGroup> |
|
</Button.RenderTransform> |
|
</Button> |
|
</Viewbox> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
<Style TargetType="{x:Type Controls:RenderTransformOriginThumb}"> |
|
<Setter Property="Template"> |
|
<Setter.Value> |
|
<ControlTemplate TargetType="{x:Type Controls:RenderTransformOriginThumb}"> |
|
<Grid Width="10" Height="10" Margin="-5,-5,-5,-5"> |
|
<Ellipse Width="2" Height="2" Fill="Black"/> |
|
<Ellipse Width="10" Height="10" Fill="Transparent" Stroke="Black" StrokeThickness="1" /> |
|
</Grid> |
|
</ControlTemplate> |
|
</Setter.Value> |
|
</Setter> |
|
</Style> |
|
</ResourceDictionary>
|
|
|