Initial commit

This commit is contained in:
2014-04-30 17:33:21 -04:00
commit f965f46fb3
33 changed files with 2949 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
<UserControl x:Class="Common.Wpf.LinkControl.LinkControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="300">
<Hyperlink Name="HyperlinkControl">
<TextBlock Name="ContentControl" />
</Hyperlink>
</UserControl>

View 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;
}
}
}
}