Method wpfBuilder.Add(+ 4 overloads)
Overload
Adds an existing element (control etc of any type).
public wpfBuilder Add(FrameworkElement element, WBAdd flags = 0)
Parameters
element (FrameworkElement) |
flags (WBAdd) |
Returns
Exceptions
NotSupportedException
The function does not support flag childOfLast for this element type. |
Overload(next)
Creates and adds element of type T (control etc of any type).
public wpfBuilder Add<T>(out T variable, object text = null, WBAdd flags = 0) where T : FrameworkElement, new()
Parameters
variable (T)
Receives element's variable. The function creates element of variable's type. You can use the variable to set element's properties before showing window or/and to get value after.
Examples: |
text (object)
Text, header or other content. Supported element types (or base types):
|
flags (WBAdd) |
Returns
Exceptions
NotSupportedException
The function does not support non- |
Type Parameters
T |
Overload(next)
Creates and adds element of type T (any type). This overload can be used when don't need element's variable.
public wpfBuilder Add<T>(object text = null, WBAdd flags = 0) where T : FrameworkElement, new()
Parameters
Returns
Exceptions
NotSupportedException
The function does not support non- |
Type Parameters
T |
Overload(next)
Adds 2 elements: System.Windows.Controls.Label and element of type T (control etc of any type).
public wpfBuilder Add<T>(object label, out T variable, object text = null, WBGridLength? row2 = null) where T : FrameworkElement, new()
Parameters
label (object)
Label text. Usually string or System.Windows.Controls.TextBlock. Example: |
variable (T)
Variable of second element. More info - see other overload. |
text (object)
Text, header or other content of second element. More info - see other overload. |
row2 (WBGridLength?)
If not |
Returns
Exceptions
NotSupportedException
If the function does not support non- |
Type Parameters
T |
Remarks
Finally calls wpfBuilder.LabeledBy; it sets System.Windows.Controls.Label.Target, calls System.Windows.Automation.AutomationProperties.SetLabeledBy and applies the bindLabelVisibility option (see wpfBuilder.Options).
Overload(top)
Adds 2 elements: System.Windows.Controls.Label and an existing element (control etc of any type).
public wpfBuilder Add(object label, FrameworkElement element, WBGridLength? row2 = null)
Parameters
label (object)
Label text. Usually string or System.Windows.Controls.TextBlock. Example: |
element (FrameworkElement) |
row2 (WBGridLength?)
If not |
Returns
Exceptions
NotSupportedException
If the function does not support non- |
Remarks
Finally calls wpfBuilder.LabeledBy; it sets System.Windows.Controls.Label.Target, calls System.Windows.Automation.AutomationProperties.SetLabeledBy and applies the bindLabelVisibility option (see wpfBuilder.Options).