mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-12 12:16:37 +08:00
demo提交
This commit is contained in:
23
AIStudio.Wpf.DiagramDesigner.Demo/Views/CustomNodeView.xaml
Normal file
23
AIStudio.Wpf.DiagramDesigner.Demo/Views/CustomNodeView.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.CustomNodeView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner.Demo;component/ViewModels/CustomDesignerItemViewModel.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// CustomNodeView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CustomNodeView : UserControl
|
||||
{
|
||||
public CustomNodeView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Views"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid x:Name="grid">
|
||||
@@ -25,6 +25,8 @@
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl Grid.Column="1" x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
<dd:PropertiesView Grid.Column="2" CustomSetting="True" SelectedObject="{Binding SelectedItem}" Width="200">
|
||||
<dd:PropertiesView.Resources>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Views"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
@@ -45,5 +45,7 @@
|
||||
Users="{Binding Users}"
|
||||
Roles="{Binding Roles}">
|
||||
</dd:FlowchartEditor>
|
||||
|
||||
<controls:TitleControl Grid.RowSpan="2"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml
Normal file
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.LockedView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
26
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml.cs
Normal file
26
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// LockedView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class LockedView : UserControl
|
||||
{
|
||||
public LockedView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
20
AIStudio.Wpf.DiagramDesigner.Demo/Views/PerformanceView.xaml
Normal file
20
AIStudio.Wpf.DiagramDesigner.Demo/Views/PerformanceView.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.PerformanceView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<ScrollViewer x:Name="designerScrollViewer" Background="{DynamicResource GrayBrush8}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Left"/>
|
||||
</ScrollViewer>
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// PerformanceView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class PerformanceView : UserControl
|
||||
{
|
||||
public PerformanceView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Views"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/SnapToGridView.xaml
Normal file
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/SnapToGridView.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.SnapToGridView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// SnapToGridView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SnapToGridView : UserControl
|
||||
{
|
||||
public SnapToGridView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user