mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-14 13:36:38 +08:00
项目结构调整
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
<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"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ComboBox.xaml" />
|
||||
</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}}}"/>
|
||||
|
||||
<ScrollViewer Grid.Column="1">
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="PART_DiagramControl" MinWidth="1000" MinHeight="1000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</ScrollViewer>
|
||||
<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">
|
||||
<dd:PropertiesView CustomSetting="True"
|
||||
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>
|
||||
Reference in New Issue
Block a user