3

I built a WPF custom control which derived from HeaderedItemsControl and whose items are hidden by default (they become visible when the user clicks the header).

I want to add design time support for this control similar to the Expander control. By default, it's content is hidden but when it is selected in the document outline or the designer, its content is shown.

My actual question is: how can I react to selection in the VS / Blend visual designer to achieve the same behavior as e.g. the Expander for my control?

I learned that there is a DesignerProperties.DesignMode attached property that I can use to check whether the control is currently executed in the designer or not. But how can I react to a selection event to make my items visible?

Thanks in advance for your answers.

Edit: I'm targeting Visual Studio / Blend 2013.

feO2x
  • 5,358
  • 2
  • 37
  • 46

0 Answers0