mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-03 23:56:37 +08:00
简单demo继续完善
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Test"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramHelper.Controls;assembly=AIStudio.Wpf.DiagramHelper"
|
||||
xmlns:flowchart="clr-namespace:AIStudio.Wpf.Flowchart;assembly=AIStudio.Wpf.Flowchart"
|
||||
xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Window.Resources>
|
||||
@@ -32,5 +35,52 @@
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl Grid.Column="1" x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:PropertiesView Grid.Column="2" SelectedObject="{Binding SelectedItem}" Width="200">
|
||||
<controls:PropertiesView.Resources>
|
||||
<Color x:Key="Gray8">#FFE0E0E0</Color>
|
||||
<SolidColorBrush x:Key="GrayBrush8" Color="{StaticResource Gray8}" options:Freeze="True" />
|
||||
<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" BorderBrush="Transparent" Text="{Binding ActType}" >
|
||||
<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}}}">
|
||||
<controls:MultiSelectComboBox BorderThickness="0" DisplayMemberPath="text" SelectedValuePath="value"
|
||||
SelectedValues="{Binding UserIds}"
|
||||
ItemsSource="{x:Static flowchart:FlowchartService.Users}" ></controls: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}}}">
|
||||
<controls:MultiSelectComboBox BorderThickness="0" DisplayMemberPath="text" SelectedValuePath="value"
|
||||
SelectedValues="{Binding RoleIds}"
|
||||
ItemsSource="{x:Static flowchart:FlowchartService.Roles}"></controls:MultiSelectComboBox>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</controls:PropertiesView.Resources>
|
||||
</controls:PropertiesView>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user