Geeks With Blogs

@vbdotnetter
  • vbdotnetter Grace isn't found atop a mountain, that's relief. Somewhere along the way moving forward facing risk and never looking back - that's grace. about 943 days ago
  • vbdotnetter Hell of a day climbing at Rumbling Bald! about 946 days ago
  • vbdotnetter Day off tomorrow after 8 months sending a work project to production. Relief! Rumbling Bald climbing on Saturday - can't wait :) about 949 days ago
  • vbdotnetter Great time at Moore's Wall yesterday with Amy. Back to work unfortunately, but Rumbling Bald climbing on Saturday hopefully. about 952 days ago
  • vbdotnetter Packed up and ready to get up early so Amy and I can head up to Moore's Wall. 6 or 7 pitches of old school trad climbing. Should be a blast! about 953 days ago
  • vbdotnetter Work week almost over! Counting down until climbing at Ship Rock tomorrow. about 956 days ago
  • vbdotnetter No bears on our trip this weekend, but there was a turkey wandering around doing turkey things... about 961 days ago
  • vbdotnetter Great time at Table Rock - Amy and I climbed 4 pitches on Saturday and had a great couple nights of camping. about 961 days ago
  • vbdotnetter Table Rock this weekend with Amy and the pups Ship Rock next Saturday with Jeff & Hopefully Pilot next Sunday with Amy Ben & Raina Climb on! about 963 days ago
  • vbdotnetter Excellent time this weekend helping out at the Adopt a Crag at Looking Glass + festivities & training with Fox Mtn. Great new gear & friends about 967 days ago

Ramblings of a Flying Programmer

Recently while exploring multi-threading with WPF, I came across a method on a WPF control's Dispatcher to check if the current thread has access to the control.

 myButton.Dispatcher.CheckAccess();

Now, the funny thing about this method is that it is a public method, but unavailble from Intellisense within Visual Studio. If manually typed in, it compiles and executes just fine, but there was no idication of that method existing. Now how could that be? Could I have missed something? Obviously I did - this method of hiding members has been available at least as far back as the 1.1 version of the framework.

[EditorBrowsable(1)]
public boolean CheckAccess();

This attribute takes a parameter which is an EditorBrowsableState. This is an enumeration defined as:

Always = 0 //The property or method is always browsable from within an editor.
Never = 1
//The property or method is never browsable from within an editor.
Advanced = 2 //The property or method is a feature that only advanced users should see. An editor can either show or hide such properties.

First of all, who determines whether I am an advanced user or not? Well, that's an option set in Visual Studio.

Hide Advanced Members

Ok, so by default these Advanced members aren't hidden. Whew! But as for the EditorBrowsable(1) members, keep in mind there may be more available than what you are seeing!

More on MSDN...

Posted on Monday, January 14, 2008 9:13 PM WPF | Back to top


Comments on this post: Hidden Methods - EditorBrowsable

# re: Hidden Methods - EditorBrowsable
Requesting Gravatar...
But then, if they aren't hidden, how come they don't show up?! And do you happen to know where's the option to display "Advanced" Properties of Controls (e.g., DataGridView's AutoGenerateColumns) in the Visual Designer? TIA.
Left by C on Apr 21, 2013 4:22 AM

Your comment:
 (will show your gravatar)
 


Copyright © John Saunders | Powered by: GeeksWithBlogs.net | Join free