|
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
|
|
using System.Drawing;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
+using ICSharpCode.AvalonEdit;
|
|
|
using InABox.Configuration;
|
|
|
using InABox.Core;
|
|
|
|
|
@@ -17,6 +18,31 @@ public interface IPanelActionItem
|
|
|
public class PanelAction : DependencyObject, IPanelActionItem
|
|
|
{
|
|
|
public Action<PanelAction>? OnExecute { get; set; }
|
|
|
+
|
|
|
+ public static readonly DependencyProperty IsEnabledProperty = DependencyProperty.Register(
|
|
|
+ nameof(IsEnabled),
|
|
|
+ typeof(bool),
|
|
|
+ typeof(PanelAction),
|
|
|
+ new PropertyMetadata(true)
|
|
|
+ );
|
|
|
+
|
|
|
+ public bool IsEnabled
|
|
|
+ {
|
|
|
+ get => (bool)GetValue(IsEnabledProperty);
|
|
|
+ set => SetValue(IsEnabledProperty, value);
|
|
|
+ }
|
|
|
+ public static readonly DependencyProperty VisibilityProperty = DependencyProperty.Register(
|
|
|
+ nameof(Visibility),
|
|
|
+ typeof(Visibility),
|
|
|
+ typeof(PanelAction),
|
|
|
+ new PropertyMetadata(Visibility.Visible)
|
|
|
+ );
|
|
|
+
|
|
|
+ public Visibility Visibility
|
|
|
+ {
|
|
|
+ get => (Visibility)GetValue(VisibilityProperty);
|
|
|
+ set => SetValue(VisibilityProperty, value);
|
|
|
+ }
|
|
|
|
|
|
public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register(
|
|
|
nameof(Caption),
|