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.
75 lines
3.7 KiB
75 lines
3.7 KiB
<!--***********************************************************************************
|
|
|
|
Toolkit for WPF
|
|
|
|
Copyright (C) 2007-2020 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
|
|
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
|
|
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
**********************************************************************************-->
|
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit"
|
|
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.Mag.Converters"
|
|
xmlns:coreconv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters">
|
|
|
|
<!-- =============================================================================== -->
|
|
<!-- Magnifier -->
|
|
<!-- =============================================================================== -->
|
|
|
|
<conv:RadiusConverter x:Key="RadiusConverter" />
|
|
<coreconv:BorderThicknessToStrokeThicknessConverter x:Key="BorderThicknessToStrokeThicknessConverter" />
|
|
|
|
<ControlTemplate x:Key="CircleTemplate" TargetType="{x:Type local:Magnifier}">
|
|
<Grid>
|
|
<Ellipse Fill="{TemplateBinding Background}" />
|
|
<Ellipse Stroke="{Binding Path=BorderBrush, RelativeSource={RelativeSource TemplatedParent}}"
|
|
StrokeThickness="{Binding Path=BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BorderThicknessToStrokeThicknessConverter}}">
|
|
<Ellipse.Fill>
|
|
<VisualBrush x:Name="PART_VisualBrush"
|
|
ViewboxUnits="Absolute"
|
|
Visual="{Binding Path=Target, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Ellipse.Fill>
|
|
</Ellipse>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="RectangleTemplate" TargetType="{x:Type local:Magnifier}">
|
|
<Grid Background="{TemplateBinding Background}" >
|
|
<Rectangle Stroke="{Binding Path=BorderBrush, RelativeSource={RelativeSource TemplatedParent}}"
|
|
StrokeThickness="{Binding Path=BorderThickness, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BorderThicknessToStrokeThicknessConverter}}">
|
|
<Rectangle.Fill>
|
|
<VisualBrush x:Name="PART_VisualBrush"
|
|
ViewboxUnits="Absolute"
|
|
Visual="{Binding Path=Target, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Rectangle.Fill>
|
|
</Rectangle>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<Style TargetType="{x:Type local:Magnifier}">
|
|
<Setter Property="IsHitTestVisible" Value="False" />
|
|
<Style.Triggers>
|
|
<Trigger Property="FrameType" Value="Circle">
|
|
<Setter Property="Template" Value="{StaticResource CircleTemplate}" />
|
|
</Trigger>
|
|
<Trigger Property="FrameType" Value="Rectangle">
|
|
<Setter Property="Template" Value="{StaticResource RectangleTemplate}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled"
|
|
Value="False">
|
|
<Setter Property="Template"
|
|
Value="{x:Null}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|
|
|