Initial commit

This commit is contained in:
2023-04-07 14:06:42 -04:00
commit fd57c19bd6
8 changed files with 525 additions and 0 deletions

37
LinkControl.xaml.cs Normal file
View File

@@ -0,0 +1,37 @@
using System.Windows;
namespace ChrisKaczor.Wpf.Controls
{
public partial class Link
{
public event RoutedEventHandler? Click;
public Link()
{
InitializeComponent();
HyperlinkControl.Click += HandleHyperlinkControlClick;
}
private void HandleHyperlinkControlClick(object sender, RoutedEventArgs e)
{
Click?.Invoke(sender, e);
}
public string Text
{
get => ContentControl.Text;
set => ContentControl.Text = value;
}
public new bool IsEnabled
{
get => base.IsEnabled;
set
{
base.IsEnabled = value;
HyperlinkControl.IsEnabled = value;
}
}
}
}