2,000 Things You Should Know About WPF

Everything a WPF Developer Needs to Know, in Bite-Sized Chunks

  • Home
  • About
  • Index
Posts Comments
  • Controls
  • Layout
  • Events
  • Basics
  • Blend
  • Graphics
  • XAML
  • Miscellaneous
  • Dependency Properties
  • Visual Studio

#89 – Using Visual Studio to Follow the Inheritance Chain for WPF Types

October 9, 2010 Leave a comment

The inheritance chain for WPF classes is pretty deep.  The Button class, for example, inherits from ButtonBase, and then from ContentControl, Control, FrameworkElement, etc.

You can look classes up in the MSDN documentation to find out which classes a particular class inherits from and which properties and methods it inherits.  Or you can use the Go To Definition feature in Visual Studio 2010 to follow the chain.

Assume you have some code that mentions the Button class.  You can right-click on the word “Button” and select Go To Definition.

You’ll see the metadata for Button and that it inherits from ButtonBase.

To follow the chain, right-click on ButtonBase and select Go To Definition again.

Again, a metadata window comes up, this time showing you the metadata for the ButtonBase class–and the fact that ButtonBase inherits from ContentControl.

The containing DLL is also listed at the top of the window.

Advertisement

Filed under Visual Studio Tagged with Inheritance, Metadata, Visual Studio

Sean Sexton

Recent Posts

  • #1,219 – Expanding All Nodes in a TreeView by Default
  • #1,218 – Stretching Items in TreeView across Entire Control
  • #1,217 – Using Multiple HierarchicalDataTemplates in a TreeView
  • #1,216 – Creating a Custom ItemTemplate in a TreeView
  • #1,215 – Binding a TreeView to a Hierarchical Data Source

Blogroll

  • 2,000 Things You Should Know About C#
  • Britannica Geek
  • Sean on Twitter
  • Sean's Stuff

Calendar

October 2010
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Sep   Nov »

Top Posts

  • #1,204 - Using a DataTrigger to Change Content in a ContentPresenter
  • #1,219 - Expanding All Nodes in a TreeView by Default
  • #210 - Specifying Colors in XAML As RGB Values
  • #220 - Using the Predefined Colors
  • #1,107 - Accessing an Embedded Resource Using a Uri
  • #1,218 - Stretching Items in TreeView across Entire Control
  • #1,012 - Using a Different Data Template for the Face of a ComboBox
  • #1,215 - Binding a TreeView to a Hierarchical Data Source
  • #1,217 - Using Multiple HierarchicalDataTemplates in a TreeView
  • Index

Tags

Application Background Basics Binding Blend Border Brush Button Calendar Canvas CheckBox Color Colors ComboBox Commands ContentControl Controls Cursor Data Binding Dependency Properties Dependency property DockPanel Drag-and-Drop Events Expander FlowDocument Focus Fonts FrameworkElement Gradient Graphics Grid GridSplitter GroupBox HorizontalAlignment Image InkCanvas Input ItemsControl Keyboard Keyboard Focus KeyDown KeyUp Layout LinearGradientBrush ListBox Localization Manipulation Margin Measure Miscellaneous Mouse Panel Popup Radial Gradient Resources Routed Events ScrollViewer Shape Slider StackPanel TabControl Text TextBlock TextBox Tooltip Touch Input Transforms UIElement Visual Studio Window Windows WPF WrapPanel XAML

Blog Stats

  • 5,180,651 hits

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • 2,000 Things You Should Know About WPF
    • Join 291 other followers
    • Already have a WordPress.com account? Log in now.
    • 2,000 Things You Should Know About WPF
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...