mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-22 17:58:33 +08:00
C# 脚本模块正式发布
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.Script.ViewModels"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:avEditEx="clr-namespace:TextEditLib;assembly=TextEditLib"
|
||||
xmlns:reskeys="clr-namespace:TextEditLib.Themes;assembly=TextEditLib"
|
||||
xmlns:helper="clr-namespace:AIStudio.Wpf.Script.Helpers"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.Script.Controls">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/TextEditLib;component/Themes/Icons.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
|
||||
|
||||
<DataTemplate DataType="{x:Type viewmodel:ColorBoxCollectorScriptViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Border BorderThickness="{Binding BorderThickness}"
|
||||
BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
CornerRadius="{Binding CornerRadius}"
|
||||
IsHitTestVisible="False">
|
||||
</Border>
|
||||
<ItemsControl ItemsSource="{Binding ItemsSource}" Margin="5">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="1">
|
||||
<Path
|
||||
Data="{Binding Path}"
|
||||
Fill="{Binding Color,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"
|
||||
Width="20"
|
||||
Height="20"/>
|
||||
<TextBlock
|
||||
Text="{Binding Text}"
|
||||
FontSize="9"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<TextBlock Text="{Binding OrderNumber,StringFormat={}{0}#}" Foreground="Blue" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="2"/>
|
||||
<StackPanel Margin="-45,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
<Path
|
||||
Data="{Binding Tag.Path}"
|
||||
Fill="{Binding Tag.Color,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"
|
||||
Width="16"
|
||||
Height="16"/>
|
||||
<TextBlock
|
||||
Text="{Binding Tag.Text}"
|
||||
FontSize="9"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,51 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.Script.ViewModels"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:avEditEx="clr-namespace:TextEditLib;assembly=TextEditLib"
|
||||
xmlns:reskeys="clr-namespace:TextEditLib.Themes;assembly=TextEditLib"
|
||||
xmlns:helper="clr-namespace:AIStudio.Wpf.Script.Core.Helpers;assembly=AIStudio.Wpf.Script.Core"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.Script.Core.Controls;assembly=AIStudio.Wpf.Script.Core">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/TextEditLib;component/Themes/Icons.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
|
||||
|
||||
<DataTemplate DataType="{x:Type viewmodel:ColorBoxFactoryScriptViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Border BorderThickness="{Binding BorderThickness}"
|
||||
BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}"
|
||||
CornerRadius="{Binding CornerRadius}"
|
||||
IsHitTestVisible="False">
|
||||
</Border>
|
||||
<ItemsControl ItemsSource="{Binding ItemsSource}" Margin="5">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Margin="1">
|
||||
<Path
|
||||
Data="{Binding Path}"
|
||||
Fill="{Binding Color,Converter={StaticResource ColorBrushConverter}}"
|
||||
Stretch="Fill"
|
||||
Width="20"
|
||||
Height="20"/>
|
||||
<TextBlock
|
||||
Text="{Binding Text}"
|
||||
FontSize="9"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<TextBlock Text="{Binding OrderNumber,StringFormat={}{0}#}" Foreground="Blue" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="2"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user