mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-21 08:56:36 +08:00
继续调整
This commit is contained in:
@@ -30,5 +30,12 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Update="Styles\ComboBox.xaml">
|
||||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -25,42 +25,46 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
List<PointInfoBase> points = (List<PointInfoBase>)values[0];
|
||||
PathGeometry pathGeometry = new PathGeometry();
|
||||
PathFigure figure = new PathFigure();
|
||||
figure.StartPoint = points[0];
|
||||
if (values[1]?.ToString() == DrawMode.RadiusConnectingLine.ToString())
|
||||
if (values[0] != null)
|
||||
{
|
||||
for (var i = 0; i < points.Count - 1; i++)
|
||||
{
|
||||
int current = i, last = i - 1, next = i + 1, next2 = i + 2;
|
||||
if (last == -1)
|
||||
{
|
||||
last = 0;
|
||||
}
|
||||
if (next == points.Count)
|
||||
{
|
||||
next = points.Count - 1;
|
||||
}
|
||||
if (next2 == points.Count)
|
||||
{
|
||||
next2 = points.Count - 1;
|
||||
}
|
||||
var bzs = SegmentHelper.GetBezierSegment(points[current], points[last], points[next], points[next2]);
|
||||
figure.Segments.Add(bzs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < points.Count; i++)
|
||||
{
|
||||
List<PointInfoBase> points = (List<PointInfoBase>)values[0];
|
||||
|
||||
LineSegment arc = new LineSegment(points[i], true);
|
||||
figure.Segments.Add(arc);
|
||||
PathFigure figure = new PathFigure();
|
||||
figure.StartPoint = points[0];
|
||||
if (values[1]?.ToString() == DrawMode.RadiusConnectingLine.ToString())
|
||||
{
|
||||
for (var i = 0; i < points.Count - 1; i++)
|
||||
{
|
||||
int current = i, last = i - 1, next = i + 1, next2 = i + 2;
|
||||
if (last == -1)
|
||||
{
|
||||
last = 0;
|
||||
}
|
||||
if (next == points.Count)
|
||||
{
|
||||
next = points.Count - 1;
|
||||
}
|
||||
if (next2 == points.Count)
|
||||
{
|
||||
next2 = points.Count - 1;
|
||||
}
|
||||
var bzs = SegmentHelper.GetBezierSegment(points[current], points[last], points[next], points[next2]);
|
||||
figure.Segments.Add(bzs);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < points.Count; i++)
|
||||
{
|
||||
|
||||
pathGeometry.Figures.Add(figure);
|
||||
LineSegment arc = new LineSegment(points[i], true);
|
||||
figure.Segments.Add(arc);
|
||||
}
|
||||
}
|
||||
|
||||
pathGeometry.Figures.Add(figure);
|
||||
}
|
||||
return pathGeometry;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- SimpleStyles: Expander -->
|
||||
|
||||
<ControlTemplate x:Key="ExpanderToggleButton" TargetType="ToggleButton">
|
||||
<Border
|
||||
Name="Border"
|
||||
CornerRadius="2,0,0,0"
|
||||
Background="Transparent"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="0,0,0,0">
|
||||
<Path
|
||||
Name="Arrow"
|
||||
Fill="{StaticResource GlyphBrush}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="M 0 0 L 4 4 L 8 0 Z"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ToggleButton.IsMouseOver" Value="true">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource DarkBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter TargetName="Arrow" Property="Data"
|
||||
Value="M 0 4 L 4 0 L 8 4 Z" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource DisabledBackgroundBrush}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
Value="{StaticResource DisabledBorderBrush}" />
|
||||
<Setter Property="Foreground"
|
||||
Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
<Setter TargetName="Arrow" Property="Fill"
|
||||
Value="{StaticResource DisabledForegroundBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="Expander">
|
||||
<Setter Property="FontFamily" Value="SegoeUI"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#4C4C4C"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Name="ContentRow" Height="0"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Name="Border"
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource LightBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2,2,0,0" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton
|
||||
IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,
|
||||
RelativeSource={RelativeSource TemplatedParent}}"
|
||||
OverridesDefaultStyle="True"
|
||||
Template="{StaticResource ExpanderToggleButton}"
|
||||
Background="{StaticResource NormalBrush}" />
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
Name="Content"
|
||||
Grid.Row="1"
|
||||
Background="{StaticResource WindowBackgroundBrush}"
|
||||
BorderBrush="{StaticResource SolidBorderBrush}"
|
||||
BorderThickness="1,0,1,1"
|
||||
CornerRadius="0,0,2,2" >
|
||||
<ContentPresenter Margin="4" />
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="True">
|
||||
<Setter TargetName="ContentRow" Property="Height"
|
||||
Value="{Binding ElementName=Content,Path=DesiredHeight}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource DisabledBackgroundBrush}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
Value="{StaticResource DisabledBorderBrush}" />
|
||||
<Setter Property="Foreground"
|
||||
Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,47 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- SimpleStyles: GroupBox -->
|
||||
<Style TargetType="GroupBox">
|
||||
<Setter Property="FontFamily" Value="SegoeUI"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#4C4C4C"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupBox">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource LightBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2,2,0,0" >
|
||||
<ContentPresenter
|
||||
Margin="4"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{StaticResource SolidBorderBrush}"
|
||||
BorderThickness="1,0,1,1"
|
||||
CornerRadius="0,0,2,2" >
|
||||
<ContentPresenter
|
||||
Margin="4" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,186 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border
|
||||
Name="Border"
|
||||
Margin="1"
|
||||
CornerRadius="2"
|
||||
Background="{StaticResource NormalBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Path
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{StaticResource GlyphBrush}"
|
||||
Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border Background="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border
|
||||
CornerRadius="2"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
<RowDefinition Height="0.00001*"/>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.RowSpan="3"
|
||||
CornerRadius="2"
|
||||
Background="#F0F0F0" />
|
||||
<RepeatButton
|
||||
Grid.Row="0"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Height="18"
|
||||
Command="ScrollBar.LineUpCommand"
|
||||
Content="M 0 4 L 8 4 L 4 0 Z" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Grid.Row="1"
|
||||
IsDirectionReversed="true">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageUpCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb
|
||||
Style="{StaticResource ScrollBarThumb}"
|
||||
Margin="1,0,1,0"
|
||||
Background="{StaticResource HorizontalNormalBrush}"
|
||||
BorderBrush="{StaticResource HorizontalNormalBorderBrush}" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageDownCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Grid.Row="3"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Height="18"
|
||||
Command="ScrollBar.LineDownCommand"
|
||||
Content="M 0 0 L 4 4 L 8 0 Z"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="18"/>
|
||||
<ColumnDefinition Width="0.00001*"/>
|
||||
<ColumnDefinition MaxWidth="18"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Grid.ColumnSpan="3"
|
||||
CornerRadius="2"
|
||||
Background="#F0F0F0" />
|
||||
<RepeatButton
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Width="18"
|
||||
Command="ScrollBar.LineLeftCommand"
|
||||
Content="M 4 0 L 4 8 L 0 4 Z" />
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Grid.Column="1"
|
||||
IsDirectionReversed="False">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageLeftCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb
|
||||
Style="{StaticResource ScrollBarThumb}"
|
||||
Margin="0,1,0,1"
|
||||
Background="{StaticResource NormalBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageRightCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Width="18"
|
||||
Command="ScrollBar.LineRightCommand"
|
||||
Content="M 0 0 L 4 4 L 0 8 Z"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Height" Value="18" />
|
||||
<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
<Setter Property="Width" Value="18"/>
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,43 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<!-- SimpleStyles: ScrollViewer -->
|
||||
|
||||
<Style x:Key="LeftScrollViewer" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollContentPresenter Grid.Column="1"/>
|
||||
|
||||
<ScrollBar Name="PART_VerticalScrollBar"
|
||||
Value="{TemplateBinding VerticalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
|
||||
<ScrollBar Name="PART_HorizontalScrollBar"
|
||||
Orientation="Horizontal"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Value="{TemplateBinding HorizontalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,118 +0,0 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!-- Fill Brushes -->
|
||||
|
||||
<LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#CCC" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#CCC" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#AAA" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#BBB" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="0.1"/>
|
||||
<GradientStop Color="#EEE" Offset="0.9"/>
|
||||
<GradientStop Color="#FFF" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
|
||||
|
||||
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
|
||||
|
||||
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
|
||||
|
||||
<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />
|
||||
|
||||
<!-- Border Brushes -->
|
||||
|
||||
<LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#CCC" Offset="0.0"/>
|
||||
<GradientStop Color="#444" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#CCC" Offset="0.0"/>
|
||||
<GradientStop Color="#444" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#777" Offset="0.0"/>
|
||||
<GradientStop Color="#000" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#444" Offset="0.0"/>
|
||||
<GradientStop Color="#888" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
|
||||
|
||||
<SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
|
||||
|
||||
<SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
|
||||
|
||||
<SolidColorBrush x:Key="GlyphBrush" Color="#444" />
|
||||
|
||||
<SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,38 +0,0 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- SimpleStyles: ToolTip -->
|
||||
<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="HasDropShadow" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToolTip">
|
||||
<Border Name="Border"
|
||||
Background="{StaticResource LightBrush}"
|
||||
BorderBrush="{StaticResource SolidBorderBrush}"
|
||||
BorderThickness="1"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}">
|
||||
<ContentPresenter
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasDropShadow" Value="true">
|
||||
<Setter TargetName="Border" Property="CornerRadius" Value="4"/>
|
||||
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -1,245 +0,0 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="{x:Type s:ZoomBox}">
|
||||
|
||||
<Style.Resources>
|
||||
|
||||
<VisualBrush x:Key="AlphaBrush"
|
||||
Stretch="None"
|
||||
TileMode="Tile"
|
||||
ViewportUnits="Absolute"
|
||||
Viewport="0,0,8,8">
|
||||
<VisualBrush.Visual>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4" />
|
||||
<ColumnDefinition Width="4" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="4" />
|
||||
<RowDefinition Height="4" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Fill="#EEE"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0" />
|
||||
<Rectangle Fill="#AAA"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1" />
|
||||
<Rectangle Fill="#AAA"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0" />
|
||||
<Rectangle Fill="#EEE"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1" />
|
||||
</Grid>
|
||||
</VisualBrush.Visual>
|
||||
</VisualBrush>
|
||||
|
||||
<Style x:Key="ToggleButtonStyle"
|
||||
TargetType="ToggleButton">
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="true" />
|
||||
<Setter Property="OverridesDefaultStyle"
|
||||
Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<Border x:Name="Border"
|
||||
Background="{StaticResource NormalBrush}">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver"
|
||||
Value="true">
|
||||
<Setter TargetName="Border"
|
||||
Property="Background"
|
||||
Value="{StaticResource DarkBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Expander">
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="true" />
|
||||
<Setter Property="OverridesDefaultStyle"
|
||||
Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Expander">
|
||||
<DockPanel>
|
||||
<ToggleButton Style="{StaticResource ToggleButtonStyle}"
|
||||
DockPanel.Dock="Top"
|
||||
IsChecked="{Binding Path=IsExpanded,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
HorizontalContentAlignment="Left"
|
||||
VerticalContentAlignment="Center">
|
||||
<ToggleButton.Content>
|
||||
<Grid Margin="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Path Grid.Column="0"
|
||||
SnapsToDevicePixels="True"
|
||||
Name="Arrow"
|
||||
Fill="{TemplateBinding Foreground}"
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
StrokeThickness="0.5"
|
||||
RenderTransformOrigin="0.5,0.5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="M 0 0 L 0 8 L 5 4 Z">
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform Angle="0" />
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
<ContentPresenter Grid.Column="1"
|
||||
Name="HeaderContent"
|
||||
ContentSource="Header" />
|
||||
</Grid>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<Border Name="Content">
|
||||
<Border.LayoutTransform>
|
||||
<ScaleTransform ScaleY="0" />
|
||||
</Border.LayoutTransform>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Expander.IsExpanded"
|
||||
Value="True">
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="Content"
|
||||
Storyboard.TargetProperty="LayoutTransform.ScaleY"
|
||||
To="1"
|
||||
Duration="0:0:0.3" />
|
||||
<DoubleAnimation Storyboard.TargetName="Content"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="1"
|
||||
Duration="0:0:0.3" />
|
||||
<DoubleAnimation Storyboard.TargetName="Arrow"
|
||||
Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(RotateTransform.Angle)"
|
||||
Duration="0:0:0.2"
|
||||
To="90"
|
||||
DecelerationRatio="1" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.EnterActions>
|
||||
<Trigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetName="Content"
|
||||
Storyboard.TargetProperty="LayoutTransform.ScaleY"
|
||||
To="0"
|
||||
Duration="0:0:0.3" />
|
||||
<DoubleAnimation Storyboard.TargetName="Content"
|
||||
Storyboard.TargetProperty="Opacity"
|
||||
To="0"
|
||||
Duration="0:0:0.3" />
|
||||
<DoubleAnimation Storyboard.TargetName="Arrow"
|
||||
Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(RotateTransform.Angle)"
|
||||
Duration="0:0:0.2"
|
||||
AccelerationRatio="1" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</Trigger.ExitActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</Style.Resources>
|
||||
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type s:ZoomBox}">
|
||||
<Border CornerRadius="1"
|
||||
BorderThickness="1"
|
||||
Background="#EEE"
|
||||
BorderBrush="DimGray">
|
||||
<Expander IsExpanded="True"
|
||||
Background="Transparent">
|
||||
<Border BorderBrush="DimGray"
|
||||
BorderThickness="0,1,0,0"
|
||||
Padding="0"
|
||||
Height="180">
|
||||
<Grid>
|
||||
<Canvas Margin="5"
|
||||
Name="PART_ZoomCanvas">
|
||||
<Canvas.Background>
|
||||
<VisualBrush Stretch="Uniform"
|
||||
Visual="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ScrollViewer.Content}" />
|
||||
</Canvas.Background>
|
||||
<Thumb Name="PART_ZoomThumb"
|
||||
Cursor="SizeAll">
|
||||
<Thumb.Style>
|
||||
<Style TargetType="Thumb">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Thumb">
|
||||
<Rectangle StrokeThickness="1"
|
||||
Stroke="Black"
|
||||
Fill="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Thumb.Style>
|
||||
</Thumb>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Expander.Header>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Slider Name="PART_ZoomSlider"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0"
|
||||
Ticks="25,50,75,100,125,150,200,300,400,500"
|
||||
Minimum="25"
|
||||
Maximum="500"
|
||||
SmallChange="25"
|
||||
LargeChange="25"
|
||||
Value="100"
|
||||
MinWidth="104"
|
||||
MinHeight="21"
|
||||
IsSnapToTickEnabled="True"
|
||||
IsMoveToPointEnabled="False" />
|
||||
|
||||
<TextBlock Text="{Binding ElementName=PART_ZoomSlider, Path=Value}"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,14,0" />
|
||||
<TextBlock Text="%"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="1,0,2,0" />
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
</Expander>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
93
AIStudio.Wpf.DiagramDesigner/Styles/ComboBox.xaml
Normal file
93
AIStudio.Wpf.DiagramDesigner/Styles/ComboBox.xaml
Normal file
@@ -0,0 +1,93 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="ComboBoxStyle" TargetType="ComboBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ComboBox">
|
||||
<Grid>
|
||||
<ToggleButton x:Name="ToggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Grid.Column="2" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Focusable="false"
|
||||
ClickMode="Press" HorizontalContentAlignment="Left" >
|
||||
<ToggleButton.Template>
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Grid.ColumnSpan="2"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" />
|
||||
<Border
|
||||
x:Name="BorderComp"
|
||||
Grid.Column="0"
|
||||
CornerRadius="2"
|
||||
Margin="1"
|
||||
BorderThickness="0,0,0,0" >
|
||||
<TextBlock Text="{Binding Path=Text,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ComboBox}}" Padding="3" />
|
||||
</Border>
|
||||
<Border x:Name="ArrowBorder" Grid.Column="1" >
|
||||
<Path
|
||||
x:Name="Arrow"
|
||||
Stretch="Fill" Width="5" Height="3"
|
||||
Fill="Black"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="M 0 0 L 4 4 L 8 0 Z"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter TargetName="ArrowBorder" Property="Background" Value="{DynamicResource Fluent.Ribbon.Brushes.Button.MouseOver.Background}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</ToggleButton.Template>
|
||||
</ToggleButton>
|
||||
<Popup x:Name="Popup"
|
||||
Placement="Bottom"
|
||||
AllowsTransparency="True"
|
||||
Focusable="False" IsOpen="{TemplateBinding IsDropDownOpen}"
|
||||
PopupAnimation="Slide">
|
||||
<Grid x:Name="DropDown"
|
||||
SnapsToDevicePixels="True"
|
||||
MinWidth="{TemplateBinding ActualWidth}"
|
||||
MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
||||
<Border x:Name="DropDownBorder"
|
||||
BorderThickness="1" Background="{DynamicResource WhiteBrush}"
|
||||
BorderBrush="{DynamicResource GrayBrush8}"/>
|
||||
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" DataContext="{Binding}">
|
||||
<StackPanel Background="AliceBlue" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Popup>
|
||||
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
|
||||
</Trigger>
|
||||
<Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
|
||||
<Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsDropDownOpen" Value="true">
|
||||
<Setter TargetName="ToggleButton" Property="Background" Value="{DynamicResource Fluent.Ribbon.Brushes.Button.MouseOver.Background}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,69 +0,0 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
xmlns:c="clr-namespace:AIStudio.Wpf.DiagramDesigner.Controls">
|
||||
|
||||
|
||||
<!-- Connector Style -->
|
||||
<Style TargetType="{x:Type s:Connector}">
|
||||
<Setter Property="Width"
|
||||
Value="8" />
|
||||
<Setter Property="Height"
|
||||
Value="8" />
|
||||
<Setter Property="Cursor"
|
||||
Value="Cross" />
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="true" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type s:Connector}">
|
||||
<Grid>
|
||||
<!-- transparent extra space makes connector easier to hit -->
|
||||
<Rectangle Fill="Transparent"
|
||||
Margin="-2" />
|
||||
<Rectangle Fill="Lavender"
|
||||
StrokeThickness="1"
|
||||
Stroke="#AA000080" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ConnectorDecoratorTemplate Default Template -->
|
||||
<ControlTemplate x:Key="ConnectorDecoratorTemplate"
|
||||
TargetType="{x:Type Control}">
|
||||
<Grid Margin="-5">
|
||||
<s:Connector x:Name="Left"
|
||||
Orientation="Left"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left" />
|
||||
<s:Connector x:Name="Top"
|
||||
Orientation="Top"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Center" />
|
||||
<s:Connector x:Name="Right"
|
||||
Orientation="Right"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right" />
|
||||
<s:Connector x:Name="Bottom"
|
||||
Orientation="Bottom"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
|
||||
<!-- DragThumb Default Template -->
|
||||
<Style TargetType="{x:Type c:DragThumb}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type c:DragThumb}">
|
||||
<Rectangle Fill="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -2,116 +2,116 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- SimpleStyles: Expander -->
|
||||
<!-- SimpleStyles: Expander -->
|
||||
|
||||
<ControlTemplate x:Key="ExpanderToggleButton" TargetType="ToggleButton">
|
||||
<Border
|
||||
<ControlTemplate x:Key="ExpanderToggleButton" TargetType="ToggleButton">
|
||||
<Border
|
||||
Name="Border"
|
||||
CornerRadius="2,0,0,0"
|
||||
Background="Transparent"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="0,0,0,0">
|
||||
<Path
|
||||
<Path
|
||||
Name="Arrow"
|
||||
Fill="{StaticResource GlyphBrush}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Data="M 0 0 L 4 4 L 8 0 Z"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ToggleButton.IsMouseOver" Value="true">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="ToggleButton.IsMouseOver" Value="true">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource DarkBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter TargetName="Arrow" Property="Data"
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true">
|
||||
<Setter TargetName="Arrow" Property="Data"
|
||||
Value="M 0 4 L 4 0 L 8 4 Z" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource DisabledBackgroundBrush}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
Value="{StaticResource DisabledBorderBrush}" />
|
||||
<Setter Property="Foreground"
|
||||
<Setter Property="Foreground"
|
||||
Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
<Setter TargetName="Arrow" Property="Fill"
|
||||
<Setter TargetName="Arrow" Property="Fill"
|
||||
Value="{StaticResource DisabledForegroundBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style TargetType="Expander">
|
||||
<Setter Property="FontFamily" Value="SegoeUI"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#4C4C4C"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Name="ContentRow" Height="0"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
<Style TargetType="Expander">
|
||||
<Setter Property="FontFamily" Value="SegoeUI"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#4C4C4C"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Expander">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Name="ContentRow" Height="0"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Name="Border"
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource LightBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2,2,0,0" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton
|
||||
IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,
|
||||
RelativeSource={RelativeSource TemplatedParent}}"
|
||||
OverridesDefaultStyle="True"
|
||||
Template="{StaticResource ExpanderToggleButton}"
|
||||
Background="{StaticResource NormalBrush}" />
|
||||
<ContentPresenter
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
Margin="4"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border
|
||||
Name="Content"
|
||||
Grid.Row="1"
|
||||
Background="{StaticResource WindowBackgroundBrush}"
|
||||
BorderBrush="{StaticResource SolidBorderBrush}"
|
||||
BorderThickness="1,0,1,1"
|
||||
CornerRadius="0,0,2,2" >
|
||||
<ContentPresenter Margin="4" />
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="True">
|
||||
<Setter TargetName="ContentRow" Property="Height"
|
||||
<ContentPresenter Margin="4" />
|
||||
</Border>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="True">
|
||||
<Setter TargetName="ContentRow" Property="Height"
|
||||
Value="{Binding ElementName=Content,Path=DesiredHeight}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="Border" Property="Background"
|
||||
Value="{StaticResource DisabledBackgroundBrush}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
<Setter TargetName="Border" Property="BorderBrush"
|
||||
Value="{StaticResource DisabledBorderBrush}" />
|
||||
<Setter Property="Foreground"
|
||||
<Setter Property="Foreground"
|
||||
Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
</Trigger>
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -2,46 +2,46 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- SimpleStyles: GroupBox -->
|
||||
<Style TargetType="GroupBox">
|
||||
<Setter Property="FontFamily" Value="SegoeUI"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#4C4C4C"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupBox">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
<!-- SimpleStyles: GroupBox -->
|
||||
<Style TargetType="GroupBox">
|
||||
<Setter Property="FontFamily" Value="SegoeUI"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="Foreground" Value="#4C4C4C"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="GroupBox">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource LightBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2,2,0,0" >
|
||||
<ContentPresenter
|
||||
<ContentPresenter
|
||||
Margin="4"
|
||||
ContentSource="Header"
|
||||
RecognizesAccessKey="True" />
|
||||
</Border>
|
||||
<Border
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{StaticResource SolidBorderBrush}"
|
||||
BorderThickness="1,0,1,1"
|
||||
CornerRadius="0,0,2,2" >
|
||||
<ContentPresenter
|
||||
<ContentPresenter
|
||||
Margin="4" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -2,185 +2,185 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border
|
||||
<Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border
|
||||
Name="Border"
|
||||
Margin="1"
|
||||
CornerRadius="2"
|
||||
Background="{StaticResource NormalBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Path
|
||||
<Path
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{StaticResource GlyphBrush}"
|
||||
Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsPressed" Value="true">
|
||||
<Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border Background="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border Background="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border
|
||||
<Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Focusable" Value="false"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border
|
||||
CornerRadius="2"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
<RowDefinition Height="0.00001*"/>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
<RowDefinition Height="0.00001*"/>
|
||||
<RowDefinition MaxHeight="18"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.RowSpan="3"
|
||||
CornerRadius="2"
|
||||
Background="#F0F0F0" />
|
||||
<RepeatButton
|
||||
<RepeatButton
|
||||
Grid.Row="0"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Height="18"
|
||||
Command="ScrollBar.LineUpCommand"
|
||||
Content="M 0 4 L 8 4 L 4 0 Z" />
|
||||
<Track
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Grid.Row="1"
|
||||
IsDirectionReversed="true">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageUpCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb
|
||||
Style="{StaticResource ScrollBarThumb}"
|
||||
Margin="1,0,1,0"
|
||||
Background="{StaticResource HorizontalNormalBrush}"
|
||||
BorderBrush="{StaticResource HorizontalNormalBorderBrush}" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageDownCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Grid.Row="3"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Height="18"
|
||||
Command="ScrollBar.LineDownCommand"
|
||||
Content="M 0 0 L 4 4 L 8 0 Z"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="18"/>
|
||||
<ColumnDefinition Width="0.00001*"/>
|
||||
<ColumnDefinition MaxWidth="18"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="18"/>
|
||||
<ColumnDefinition Width="0.00001*"/>
|
||||
<ColumnDefinition MaxWidth="18"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Grid.ColumnSpan="3"
|
||||
CornerRadius="2"
|
||||
Background="#F0F0F0" />
|
||||
<RepeatButton
|
||||
<RepeatButton
|
||||
Grid.Column="0"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Width="18"
|
||||
Command="ScrollBar.LineLeftCommand"
|
||||
Content="M 4 0 L 4 8 L 0 4 Z" />
|
||||
<Track
|
||||
<Track
|
||||
Name="PART_Track"
|
||||
Grid.Column="1"
|
||||
IsDirectionReversed="False">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageLeftCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb
|
||||
Style="{StaticResource ScrollBarThumb}"
|
||||
Margin="0,1,0,1"
|
||||
Background="{StaticResource NormalBrush}"
|
||||
BorderBrush="{StaticResource NormalBorderBrush}" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton
|
||||
Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageRightCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
<RepeatButton
|
||||
Grid.Column="3"
|
||||
Style="{StaticResource ScrollBarLineButton}"
|
||||
Width="18"
|
||||
Command="ScrollBar.LineRightCommand"
|
||||
Content="M 0 0 L 4 4 L 0 8 Z"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Height" Value="18" />
|
||||
<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
<Setter Property="Width" Value="18"/>
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation" Value="Horizontal">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Height" Value="18" />
|
||||
<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation" Value="Vertical">
|
||||
<Setter Property="Width" Value="18"/>
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -2,31 +2,31 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<!-- SimpleStyles: ScrollViewer -->
|
||||
<!-- SimpleStyles: ScrollViewer -->
|
||||
|
||||
<Style x:Key="LeftScrollViewer" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Style x:Key="LeftScrollViewer" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollContentPresenter Grid.Column="1"/>
|
||||
<ScrollContentPresenter Grid.Column="1"/>
|
||||
|
||||
<ScrollBar Name="PART_VerticalScrollBar"
|
||||
<ScrollBar Name="PART_VerticalScrollBar"
|
||||
Value="{TemplateBinding VerticalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
|
||||
<ScrollBar Name="PART_HorizontalScrollBar"
|
||||
<ScrollBar Name="PART_HorizontalScrollBar"
|
||||
Orientation="Horizontal"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
@@ -34,10 +34,10 @@
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -1,118 +1,118 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!-- Fill Brushes -->
|
||||
|
||||
<LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#CCC" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<!-- Fill Brushes -->
|
||||
|
||||
<LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#CCC" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#CCC" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#CCC" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#AAA" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#BBB" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="0.1"/>
|
||||
<GradientStop Color="#EEE" Offset="0.9"/>
|
||||
<GradientStop Color="#FFF" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#FFF" Offset="0.0"/>
|
||||
<GradientStop Color="#AAA" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
|
||||
<LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#BBB" Offset="0.0"/>
|
||||
<GradientStop Color="#EEE" Offset="0.1"/>
|
||||
<GradientStop Color="#EEE" Offset="0.9"/>
|
||||
<GradientStop Color="#FFF" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
|
||||
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
|
||||
|
||||
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
|
||||
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
|
||||
|
||||
<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />
|
||||
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
|
||||
|
||||
<!-- Border Brushes -->
|
||||
<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />
|
||||
|
||||
<LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#CCC" Offset="0.0"/>
|
||||
<GradientStop Color="#444" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<!-- Border Brushes -->
|
||||
|
||||
<LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#CCC" Offset="0.0"/>
|
||||
<GradientStop Color="#444" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#CCC" Offset="0.0"/>
|
||||
<GradientStop Color="#444" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#777" Offset="0.0"/>
|
||||
<GradientStop Color="#000" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#CCC" Offset="0.0"/>
|
||||
<GradientStop Color="#444" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#444" Offset="0.0"/>
|
||||
<GradientStop Color="#888" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#777" Offset="0.0"/>
|
||||
<GradientStop Color="#000" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
|
||||
<LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientBrush.GradientStops>
|
||||
<GradientStopCollection>
|
||||
<GradientStop Color="#444" Offset="0.0"/>
|
||||
<GradientStop Color="#888" Offset="1.0"/>
|
||||
</GradientStopCollection>
|
||||
</GradientBrush.GradientStops>
|
||||
</LinearGradientBrush>
|
||||
|
||||
<SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
|
||||
<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
|
||||
|
||||
<SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
|
||||
|
||||
<SolidColorBrush x:Key="GlyphBrush" Color="#444" />
|
||||
<SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
|
||||
|
||||
<SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
|
||||
<SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
|
||||
|
||||
<SolidColorBrush x:Key="GlyphBrush" Color="#444" />
|
||||
|
||||
<SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -2,37 +2,37 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Shared.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!-- SimpleStyles: ToolTip -->
|
||||
<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="HasDropShadow" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToolTip">
|
||||
<Border Name="Border"
|
||||
<!-- SimpleStyles: ToolTip -->
|
||||
<Style x:Key="{x:Type ToolTip}" TargetType="ToolTip">
|
||||
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||
<Setter Property="HasDropShadow" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToolTip">
|
||||
<Border Name="Border"
|
||||
Background="{StaticResource LightBrush}"
|
||||
BorderBrush="{StaticResource SolidBorderBrush}"
|
||||
BorderThickness="1"
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}">
|
||||
<ContentPresenter
|
||||
<ContentPresenter
|
||||
Margin="4"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasDropShadow" Value="true">
|
||||
<Setter TargetName="Border" Property="CornerRadius" Value="4"/>
|
||||
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasDropShadow" Value="true">
|
||||
<Setter TargetName="Border" Property="CornerRadius" Value="4"/>
|
||||
<Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
204
AIStudio.Wpf.DiagramDesigner/Themes/DesignerItem.xaml
Normal file
204
AIStudio.Wpf.DiagramDesigner/Themes/DesignerItem.xaml
Normal file
@@ -0,0 +1,204 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner"
|
||||
xmlns:c="clr-namespace:AIStudio.Wpf.DiagramDesigner.Controls"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:gif="http://wpfanimatedgif.codeplex.com" >
|
||||
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<s:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
<s:ConectorOrientationConverter x:Key="ConectorOrientationConverter" />
|
||||
<s:ConectorValueConverter x:Key="ConectorValueConverter"/>
|
||||
<s:ArrowPathConverter x:Key="ArrowPathConverter"/>
|
||||
<s:ArrowSizeConverter x:Key="ArrowSizeConverter"/>
|
||||
<s:LineDashConverter x:Key="LineDashConverter"/>
|
||||
<s:ClipConverter x:Key="ClipConverter"/>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:TextDesignerItemViewModel}">
|
||||
<Grid >
|
||||
<Border Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" IsHitTestVisible="False"/>
|
||||
<Grid Margin="5">
|
||||
<s:TextControl s:ControlAttachProperty.Watermark="{Binding Watermark}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:ShapeDesignerItemViewModel}">
|
||||
<Grid IsHitTestVisible="False" Background="White">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="显示点" IsCheckable="True" IsChecked="{Binding ShowConnectors}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Control x:Name="control" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Line">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Line X1="{Binding ConnectionPoints[0].X}" Y1="{Binding ConnectionPoints[0].Y}"
|
||||
X2="{Binding ConnectionPoints[1].X}" Y2="{Binding ConnectionPoints[1].Y}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Stretch="Fill"></Line>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Rectangle">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"></Rectangle>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Ellipse">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Ellipse
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"></Ellipse>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Polyline">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Polyline
|
||||
Points="{Binding ConnectionPoints, Converter={x:Static s:ConnectionPathConverter.Instance}}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FillRule="Nonzero"
|
||||
Stretch="Fill"></Polyline>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Polygon">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Polygon
|
||||
Points="{Binding ConnectionPoints, Converter={x:Static s:ConnectionPathConverter.Instance}}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FillRule="Nonzero"
|
||||
Stretch="Fill"></Polygon>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="DirectLine">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Polyline
|
||||
Points="{Binding ConnectionPoints, Converter={x:Static s:ConnectionPathConverter.Instance}}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FillRule="Nonzero"
|
||||
Stretch="Fill"></Polyline>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
|
||||
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:GroupDesignerItemViewModel}">
|
||||
<Grid IsHitTestVisible="{Binding IsHitTestVisible}">
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:GifImageItemViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Image Name="PART_Image_run" gif:ImageBehavior.AnimatedSource="{Binding Icon}" gif:ImageBehavior.AutoStart="True" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Visible"/>
|
||||
<Control x:Name="control" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRunning}" Value="false">
|
||||
<Setter TargetName="PART_Image_run" Property="gif:ImageBehavior.AutoStart" Value="False" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:VideoItemViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<MediaElement x:Name="MediaPlayer" LoadedBehavior="Play" Source="{Binding Icon}" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Visible"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:ImageItemViewModel}">
|
||||
<Grid ToolTip="{Binding Icon}">
|
||||
<Grid IsHitTestVisible="False" ClipToBounds="True">
|
||||
<Image x:Name="image" Source="{Binding Icon}" Stretch="Fill"
|
||||
Margin="{Binding Object,Converter={StaticResource ClipConverter},ConverterParameter='Margin'}"
|
||||
Clip="{Binding Object,Converter={StaticResource ClipConverter},ConverterParameter='Clip'}">
|
||||
</Image>
|
||||
<Image x:Name="gif" gif:ImageBehavior.AnimatedSource="{Binding Icon}" gif:ImageBehavior.AutoStart="True" Visibility="Collapsed" Stretch="Fill"/>
|
||||
</Grid>
|
||||
<!-- PART_ResizeDecorator -->
|
||||
<Border x:Name="PART_ResizeDecorator" SnapsToDevicePixels="true" Margin="{Binding ResizeMargin,Mode=TwoWay}" Visibility="Collapsed">
|
||||
<Grid x:Name="Grid" Margin="-2">
|
||||
<c:BorderResizeThumb Height="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Stretch"/>
|
||||
<c:BorderResizeThumb Width="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
|
||||
<c:BorderResizeThumb Height="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNS" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeWE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeWE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNS" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNWSE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNESW" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNESW" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNWSE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Suffix}" Value=".gif">
|
||||
<Setter TargetName="gif" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="image" Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ResizeMode}" Value="True">
|
||||
<Setter TargetName="PART_ResizeDecorator" Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Suffix}" Value=".txt">
|
||||
<Setter TargetName="image" Property="Source" Value="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Images/file.png"/>
|
||||
<Setter TargetName="image" Property="Margin" Value="0"/>
|
||||
<Setter TargetName="image" Property="Clip" Value="{x:Null}"/>
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -6,199 +6,8 @@
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:gif="http://wpfanimatedgif.codeplex.com" >
|
||||
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||
<s:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
<s:ConectorOrientationConverter x:Key="ConectorOrientationConverter" />
|
||||
<s:ConectorValueConverter x:Key="ConectorValueConverter"/>
|
||||
<s:ArrowPathConverter x:Key="ArrowPathConverter"/>
|
||||
<s:ArrowSizeConverter x:Key="ArrowSizeConverter"/>
|
||||
<s:LineDashConverter x:Key="LineDashConverter"/>
|
||||
<s:ClipConverter x:Key="ClipConverter"/>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:TextDesignerItemViewModel}">
|
||||
<Grid >
|
||||
<Border Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" IsHitTestVisible="False"/>
|
||||
<Grid Margin="5">
|
||||
<s:TextControl s:ControlAttachProperty.Watermark="{Binding Watermark}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:ShapeDesignerItemViewModel}">
|
||||
<Grid IsHitTestVisible="False" Background="White">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="显示点" IsCheckable="True" IsChecked="{Binding ShowConnectors}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
<Control x:Name="control" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Line">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Line X1="{Binding ConnectionPoints[0].X}" Y1="{Binding ConnectionPoints[0].Y}"
|
||||
X2="{Binding ConnectionPoints[1].X}" Y2="{Binding ConnectionPoints[1].Y}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Stretch="Fill"></Line>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Rectangle">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"></Rectangle>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Ellipse">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Ellipse
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"></Ellipse>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Polyline">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Polyline
|
||||
Points="{Binding ConnectionPoints, Converter={x:Static s:ConnectionPathConverter.Instance}}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FillRule="Nonzero"
|
||||
Stretch="Fill"></Polyline>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="Polygon">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Polygon
|
||||
Points="{Binding ConnectionPoints, Converter={x:Static s:ConnectionPathConverter.Instance}}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FillRule="Nonzero"
|
||||
Stretch="Fill"></Polygon>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DrawMode}" Value="DirectLine">
|
||||
<Setter TargetName="control" Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Polyline
|
||||
Points="{Binding ConnectionPoints, Converter={x:Static s:ConnectionPathConverter.Instance}}"
|
||||
Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
StrokeThickness="{Binding ColorViewModel.LineWidth}"
|
||||
Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
FillRule="Nonzero"
|
||||
Stretch="Fill"></Polyline>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
|
||||
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:GroupDesignerItemViewModel}">
|
||||
<Grid IsHitTestVisible="{Binding IsHitTestVisible}">
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:GifImageItemViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Image Name="PART_Image_run" gif:ImageBehavior.AnimatedSource="{Binding Icon}" gif:ImageBehavior.AutoStart="True" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Visible"/>
|
||||
<Control x:Name="control" />
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding IsRunning}" Value="false">
|
||||
<Setter TargetName="PART_Image_run" Property="gif:ImageBehavior.AutoStart" Value="False" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:VideoItemViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<MediaElement x:Name="MediaPlayer" LoadedBehavior="Play" Source="{Binding Icon}" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Visible"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:ImageItemViewModel}">
|
||||
<Grid ToolTip="{Binding Icon}">
|
||||
<Grid IsHitTestVisible="False" ClipToBounds="True">
|
||||
<Image x:Name="image" Source="{Binding Icon}" Stretch="Fill"
|
||||
Margin="{Binding Object,Converter={StaticResource ClipConverter},ConverterParameter='Margin'}"
|
||||
Clip="{Binding Object,Converter={StaticResource ClipConverter},ConverterParameter='Clip'}">
|
||||
</Image>
|
||||
<Image x:Name="gif" gif:ImageBehavior.AnimatedSource="{Binding Icon}" gif:ImageBehavior.AutoStart="True" Visibility="Collapsed" Stretch="Fill"/>
|
||||
</Grid>
|
||||
<!-- PART_ResizeDecorator -->
|
||||
<Border x:Name="PART_ResizeDecorator" SnapsToDevicePixels="true" Margin="{Binding ResizeMargin,Mode=TwoWay}" Visibility="Collapsed">
|
||||
<Grid x:Name="Grid" Margin="-2">
|
||||
<c:BorderResizeThumb Height="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Stretch"/>
|
||||
<c:BorderResizeThumb Width="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
|
||||
<c:BorderResizeThumb Height="5" Cursor="SizeAll" Margin="-3" ResizeMode="DragMargin" BorderBrush="Blue" BorderThickness="5" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNS" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Center"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeWE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeWE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Right"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNS" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNWSE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNESW" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNESW" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
||||
<c:BorderResizeThumb Width="5" Height="5" Cursor="SizeNWSE" ResizeMode="Margin" Margin="-3" ResizeElement="{Binding ElementName=PART_ResizeDecorator}"
|
||||
VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Suffix}" Value=".gif">
|
||||
<Setter TargetName="gif" Property="Visibility" Value="Visible"/>
|
||||
<Setter TargetName="image" Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ResizeMode}" Value="True">
|
||||
<Setter TargetName="PART_ResizeDecorator" Property="Visibility" Value="Visible"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Suffix}" Value=".txt">
|
||||
<Setter TargetName="image" Property="Source" Value="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Images/file.png"/>
|
||||
<Setter TargetName="image" Property="Margin" Value="0"/>
|
||||
<Setter TargetName="image" Property="Clip" Value="{x:Null}"/>
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/AIStudio.Wpf.DiagramDesigner;component/Themes/DesignerItem.xaml" />
|
||||
<ResourceDictionary Source="/AIStudio.Wpf.DiagramDesigner;component/Themes/ConnectorItem.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -1013,6 +1013,11 @@
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
</ItemsControl>
|
||||
<!--<s:ZoomBox x:Name="zoomBox"
|
||||
Width="180"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="0,0,5,5" />-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ZoomValueProperty = DependencyProperty.Register("ZoomValue", typeof(double), typeof(DiagramControl), new UIPropertyMetadata(1d));
|
||||
public static readonly DependencyProperty ZoomValueProperty = DependencyProperty.Register(nameof(ZoomValue), typeof(double), typeof(DiagramControl), new UIPropertyMetadata(1d));
|
||||
public double ZoomValue
|
||||
{
|
||||
get
|
||||
@@ -40,7 +40,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
private void DesignerCanvas_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
//DesignerCanvas myDesignerCanvas = sender as DesignerCanvas;
|
||||
//zoomBox.DesignerCanvas = myDesignerCanvas;
|
||||
}
|
||||
|
||||
private async void ScaleTransform_Changed(object sender, EventArgs e)
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Parent?.IsReadOnly == true)
|
||||
if (Parent?.IsReadOnly == true && Parent?.IsLoading == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLoading
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DrawMode? VectorLineDrawMode
|
||||
{
|
||||
get; set;
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
void UpdateZIndex();
|
||||
|
||||
bool IsReadOnly{ get; set; }
|
||||
bool IsLoading{get;set;}
|
||||
Size PageSize { get; set; }
|
||||
PageSizeType PageSizeType { get; set; }
|
||||
bool ShowGrid { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user