Show / Hide Table of Contents

Method wpfBuilder.StartPanel(+ 1 overload)


Overload

Adds panel of any type. It will contain elements added with wpfBuilder.Add etc. Finally call wpfBuilder.End to return to current panel.

public wpfBuilder StartPanel(Panel panel, bool childOfLast = false)
Parameters
panel  (Panel)

New panel of any type (Grid, WrapPanel, etc). For Grid and Canvas this function sets some panel properties to make everything work like with other StartX functions.

childOfLast  (bool)

Add as child of wpfBuilder.Last, which can be of type (or base type):

  • System.Windows.Controls.ContentControl. Adds as its System.Windows.Controls.ContentControl.Content property. For example you can add a CheckBox in a Button.
  • System.Windows.Controls.Decorator, for example System.Windows.Controls.Border. Adds as its System.Windows.Controls.Decorator.Child property. .
Returns
wpfBuilder

Overload(top)

Adds a headered content control (System.Windows.Controls.GroupBox, System.Windows.Controls.Expander, etc) with child panel of any type. The panel will contain elements added with wpfBuilder.Add etc. Finally call wpfBuilder.End to return to current panel.

public wpfBuilder StartPanel<TContainer>(Panel panel, object header) where TContainer : HeaderedContentControl, new()
Parameters
panel  (Panel)

New panel of any type (Grid, WrapPanel, etc). For Grid and Canvas this function sets some panel properties to make everything work like with other StartX functions.

header  (object)

Header text/content.

Returns
wpfBuilder
Type Parameters
TContainer

Any HeaderedContentControl-based type.