📜  xaml 触发器 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:29.003000             🧑  作者: Mango

代码示例1

        
            

        
    

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
        }


        public Boolean IsLink
        {
            get { return (Boolean)GetValue(IsLinkProperty); }
            set { SetValue(IsLinkProperty, value); }
        }


        public static readonly DependencyProperty IsLinkProperty =
            DependencyProperty.Register("IsLink", typeof(Boolean),
            typeof(MainWindow), new UIPropertyMetadata(false));


    }