mirror of
https://github.com/ckaczor/Common.Wpf.git
synced 2026-01-22 01:25:37 -05:00
Initial commit
This commit is contained in:
38
LinkControl/LinkControl.xaml.cs
Normal file
38
LinkControl/LinkControl.xaml.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user