How Can I Mark The Default Value Of A Custom Dependency Property To Be False

How Can I Mark The Default Value Of A Custom Dependency Property To Be False


  • 14 Feb, 2012

    Here is an example :[C#]public class MyStateControl : ButtonBase{public MyStateControl() : base() { }public Boolean State{get { return (Boolean)this.GetValue(StateProperty); }set { this.SetValue(StateProperty, value); }}public static readonly DependencyProperty StateProperty = DependencyProperty.Register("State", typeof(Boolean), typeof(MyStateControl),new PropertyMetadata(false));}

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.