1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Input;
- namespace FWindSoft.Wpf.Controls.CustomControl
- {
- public class HyperlinkButton:Control
- {
- static HyperlinkButton()
- {
- DefaultStyleKeyProperty.OverrideMetadata(typeof(HyperlinkButton),
- new FrameworkPropertyMetadata(typeof(HyperlinkButton)));
- }
- #region 依赖属性
- public static readonly DependencyProperty CommandProperty = DependencyProperty.Register("Command",
- typeof(ICommand),
- typeof(HyperlinkButton), new PropertyMetadata(null, null));
- /// <summary>
- /// 绑定命令
- /// </summary>
- public ICommand Command
- {
- get { return (ICommand)GetValue(CommandProperty); }
- set { SetValue(CommandProperty, value); }
- }
- #region 依赖属性
- public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text",
- typeof(string),
- typeof(HyperlinkButton), new PropertyMetadata(string.Empty, null));
- /// <summary>
- /// 显示文本
- /// </summary>
- public string ext
- {
- get { return (string)GetValue(TextProperty); }
- set { SetValue(TextProperty, value); }
- }
- #endregion
- #endregion
- }
- }
|