mirror of
https://github.com/ckaczor/Common.Wpf.git
synced 2026-01-14 09:35:38 -05:00
39 lines
867 B
C#
39 lines
867 B
C#
using System.Windows;
|
|
|
|
namespace Common.Wpf.LinkControl
|
|
{
|
|
public partial class LinkControl
|
|
{
|
|
public event RoutedEventHandler Click;
|
|
|
|
public LinkControl()
|
|
{
|
|
InitializeComponent();
|
|
|
|
HyperlinkControl.Click += HandleHyperlinkControlClick;
|
|
}
|
|
|
|
private void HandleHyperlinkControlClick(object sender, RoutedEventArgs e)
|
|
{
|
|
if (Click != null)
|
|
Click.Invoke(sender, e);
|
|
}
|
|
|
|
public string Text
|
|
{
|
|
get { return ContentControl.Text; }
|
|
set { ContentControl.Text = value; }
|
|
}
|
|
|
|
public new bool IsEnabled
|
|
{
|
|
get { return base.IsEnabled; }
|
|
set
|
|
{
|
|
base.IsEnabled = value;
|
|
HyperlinkControl.IsEnabled = value;
|
|
}
|
|
}
|
|
}
|
|
}
|