Welcome to MSDN Blogs Sign in | Join | Help

WPF Visual Designer (code name Cider) Tip 4: Select Parent Control

A common task is to select parent control of the currently selected control or controls.

When only one control is selcted, there are at least three ways to achieve so.

  1. You can choose the parent control directly on Designer, or via PathControl/Document Outline, etc.
  2. You can use the current control's Context Menu to "Select" its immediate parent, its grandparent, and so on, until root element.
  3. You can press "ESC" key to have parent control selected, and "ESC" again to go up parent chain, until root element.

The third way is especially useful when you want to ensure that root is selected (just keep pressing "ESC" until no selection change occurs). Also, it works for multiple controls. In contrast, designer Context menu will not show "Select" sub menu for multiple controls.

 (This posting is provided "AS IS" with no warranties, and confers no rights.)

Published Thursday, September 06, 2007 8:23 PM by zhanbos
Filed under:

Comments

No Comments
Anonymous comments are disabled
 
Page view tracker