add Screenshot
This commit is contained in:
1 parent
08ae754ea3
commit
46b1297aa7
28 files changed
+923
-100
No files matched your search
@@ -0,0 +1,125 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||
|
||||
<Style x:Key="MaskRect4ScreenshotStyle" TargetType="Rectangle">
|
||||
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||
<Setter Property="Fill" Value="{DynamicResource DarkOpacityBrush}"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SnapRect4ScreenshotStyle" TargetType="Rectangle">
|
||||
<Setter Property="Height" Value="5"/>
|
||||
<Setter Property="Width" Value="5"/>
|
||||
<Setter Property="Fill" Value="DodgerBlue"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="LeftTop">
|
||||
<Setter Property="Margin" Value="-3, -3, 0, 0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="Top">
|
||||
<Setter Property="Margin" Value="0, -3, 0, 0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="RightTop">
|
||||
<Setter Property="Margin" Value="0, -3, -3, 0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="Right">
|
||||
<Setter Property="Margin" Value="0, 0, -3, 0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="RightBottom">
|
||||
<Setter Property="Margin" Value="0, 0, -3, -3"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="Bottom">
|
||||
<Setter Property="Margin" Value="0, 0, 0, -3"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="LeftBottom">
|
||||
<Setter Property="Margin" Value="-3, 0, 0, -3"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:TipElement.Placement" Value="Left">
|
||||
<Setter Property="Margin" Value="-3, 0, 0, 0"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Trigger>
|
||||
<DataTrigger Binding="{Binding IsSelecting}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsDrawing}" Value="True">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TargetArea4ScreenshotStyle" TargetType="Border">
|
||||
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||
<Setter Property="BorderThickness" Value="5"/>
|
||||
<Setter Property="BorderBrush" Value="DodgerBlue"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsSelecting}" Value="True">
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsDrawing}" Value="True">
|
||||
<Setter Property="IsHitTestVisible" Value="True"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Window4ScreenshotStyle" TargetType="controls:ScreenshotWindow">
|
||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||
<Setter Property="WindowStyle" Value="None"/>
|
||||
<Setter Property="WindowState" Value="Maximized"/>
|
||||
<!--<Setter Property="Topmost" Value="True"/>-->
|
||||
<Setter Property="AllowsTransparency" Value="True"/>
|
||||
<Setter Property="ResizeMode" Value="NoResize"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:ScreenshotWindow">
|
||||
<AdornerDecorator>
|
||||
<controls:SimplePanel>
|
||||
<InkCanvas EditingMode="None" Name="PART_Canvas" Background="Transparent"/>
|
||||
<Rectangle Name="PART_MaskAreaLeft" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||
<Rectangle Name="PART_MaskAreaTop" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||
<Rectangle Name="PART_MaskAreaRight" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||
<Rectangle Name="PART_MaskAreaBottom" Style="{StaticResource MaskRect4ScreenshotStyle}"/>
|
||||
<Border Name="PART_TargetArea" Style="{StaticResource TargetArea4ScreenshotStyle}">
|
||||
<controls:SimplePanel>
|
||||
<Rectangle controls:TipElement.Placement="LeftTop" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="Top" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="RightTop" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="Right" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="RightBottom" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="Bottom" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="LeftBottom" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<Rectangle controls:TipElement.Placement="Left" Style="{StaticResource SnapRect4ScreenshotStyle}"/>
|
||||
<TextBlock Name="PART_TextSize" Background="#CC212121" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="10,2"/>
|
||||
</controls:SimplePanel>
|
||||
</Border>
|
||||
</controls:SimplePanel>
|
||||
</AdornerDecorator>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -85,6 +85,7 @@
|
||||
<ResourceDictionary Source="NavigationWindow.xaml"/>
|
||||
<ResourceDictionary Source="Frame.xaml"/>
|
||||
<ResourceDictionary Source="BlendEffectBox.xaml"/>
|
||||
<ResourceDictionary Source="Screenshot.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in new issue
Block a user