线条控件

This commit is contained in:
艾竹
2023-01-25 14:42:01 +08:00
parent a01eb8825a
commit 40590bf98d
10 changed files with 1496 additions and 109 deletions

View File

@@ -20,24 +20,6 @@ namespace AIStudio.Wpf.DiagramDesigner
/// </summary>
public partial class LineControl : UserControl
{
public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
nameof(IsSelected), typeof(bool), typeof(LineControl), new FrameworkPropertyMetadata(
false, OnIsSelectedChanged));
private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (object.Equals(e.NewValue, true))
{
(d as LineControl).line.Stroke = Brushes.Black;
}
}
public bool IsSelected
{
get => (bool)GetValue(IsSelectedProperty);
set => SetValue(IsSelectedProperty, value);
}
public LineControl()
{
InitializeComponent();