CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Location
    Bahamas
    Posts
    33

    WPF Control - How to hide a property @ design time.

    I am creating a custom control and I guess its a little different then a UserControl because I can't figure out how to hide a property from the Property Window. If this property is set at Design Time it will cause an exception. I only want it set with code.

    Is this still possible?
    Thanks,
    - pgrammer

  2. #2
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815

    Re: WPF Control - How to hide a property @ design time.

    Quote Originally Posted by pgrammer View Post
    Is this still possible?
    Yes, it is possible, by setting the BrowsableAttribute of your property to false:
    Code:
    [Browsable(false)]
    public string MyProperty
    {
        get;
        set;
    }
    Edit: Just making sure - you are talking about plain .NET properties, not dependency properties, right?
    Last edited by gstercken; May 9th, 2009 at 02:41 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured