2022-12-02 23:06:31 +08:00
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:controls="clr-namespace:AIStudio.Wpf.Flowchart.Controls"
|
|
|
|
|
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram">
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Flowchart;component/Themes/FlowNode.xaml"/>
|
2022-12-05 22:48:00 +08:00
|
|
|
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ComboBox.xaml" />
|
2022-12-02 23:06:31 +08:00
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="AIStudio.Styles.FlowchartEditor" TargetType="{x:Type controls:FlowchartEditor}">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type controls:FlowchartEditor}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<!-- ToolBox Control -->
|
|
|
|
|
<ContentControl Template="{Binding ToolBox,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
|
|
|
|
|
|
|
|
|
<!-- Diagram Control -->
|
|
|
|
|
<dd:DiagramControl Grid.Column="1" x:Name="PART_DiagramControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
|
|
|
|
|
|
|
|
|
<ContentControl Grid.Column="2" x:Name="properity" Template="{Binding PropertiesBox,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="AIStudio.Styles.FlowchartEditor.Default" TargetType="{x:Type controls:FlowchartEditor}" BasedOn="{StaticResource AIStudio.Styles.FlowchartEditor}">
|
|
|
|
|
<Setter Property="ToolBox">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="Control">
|
|
|
|
|
<controls:ToolBoxControl />
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Setter Property="PropertiesBox">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="Control">
|
2022-12-04 23:07:20 +08:00
|
|
|
<dd:PropertiesView
|
2022-12-02 23:06:31 +08:00
|
|
|
SelectedObject="{Binding Path=SelectedObject,RelativeSource={RelativeSource AncestorType={x:Type controls:FlowchartEditor}}}"
|
|
|
|
|
Width="200">
|
|
|
|
|
<dd:PropertiesView.Resources>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="ActTypeStyle" TargetType="{x:Type ContentControl}">
|
|
|
|
|
<Setter Property="ContentTemplate">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid DataContext="{Binding Path=DataContext,RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}">
|
|
|
|
|
<ComboBox BorderThickness="0" Text="{Binding ActType}" Style="{StaticResource ComboBoxStyle}">
|
|
|
|
|
<ComboBoxItem Content="or"/>
|
|
|
|
|
<ComboBoxItem Content="and"/>
|
|
|
|
|
</ComboBox>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style x:Key="UserIdsStyle" TargetType="{x:Type ContentControl}">
|
|
|
|
|
<Setter Property="ContentTemplate">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid DataContext="{Binding Path=DataContext,RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}">
|
|
|
|
|
<dd:MultiSelectComboBox BorderThickness="0" DisplayMemberPath="text" SelectedValuePath="value"
|
|
|
|
|
SelectedValues="{Binding UserIds}"
|
|
|
|
|
ItemsSource="{Binding Path=Users,RelativeSource={RelativeSource AncestorType={x:Type controls:FlowchartEditor}}}" ></dd:MultiSelectComboBox>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style x:Key="RoleIdsStyle" TargetType="{x:Type ContentControl}">
|
|
|
|
|
<Setter Property="ContentTemplate">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid DataContext="{Binding Path=DataContext,RelativeSource={RelativeSource AncestorType={x:Type ContentControl}}}">
|
|
|
|
|
<dd:MultiSelectComboBox BorderThickness="0" DisplayMemberPath="text" SelectedValuePath="value"
|
|
|
|
|
SelectedValues="{Binding RoleIds}"
|
|
|
|
|
ItemsSource="{Binding Path=Roles,RelativeSource={RelativeSource AncestorType={x:Type controls:FlowchartEditor}}}"></dd:MultiSelectComboBox>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</dd:PropertiesView.Resources>
|
|
|
|
|
</dd:PropertiesView>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type controls:FlowchartEditor}" BasedOn="{StaticResource AIStudio.Styles.FlowchartEditor.Default}" />
|
|
|
|
|
</ResourceDictionary>
|