Vereinsmeisterschaften  22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
Loading...
Searching...
No Matches
Vereinsmeisterschaften.Controls.BoolTemplateContentControl Class Reference

Content control that switches its template based on a boolean value. More...

Inheritance diagram for Vereinsmeisterschaften.Controls.BoolTemplateContentControl:

Public Member Functions

override void OnApplyTemplate ()
 Called when the control's template is applied.
 

Static Public Attributes

static readonly DependencyProperty BoolValueProperty = DependencyProperty.Register(nameof(BoolValue), typeof(bool), typeof(BoolTemplateContentControl), new PropertyMetadata(false, OnAnyPropertyChanged))
 
static readonly DependencyProperty TrueTemplateProperty = DependencyProperty.Register(nameof(TrueTemplate), typeof(ControlTemplate), typeof(BoolTemplateContentControl), new PropertyMetadata(null, OnAnyPropertyChanged))
 
static readonly DependencyProperty FalseTemplateProperty = DependencyProperty.Register(nameof(FalseTemplate), typeof(ControlTemplate), typeof(BoolTemplateContentControl), new PropertyMetadata(null, OnAnyPropertyChanged))
 

Properties

bool BoolValue [get, set]
 Dependency property for the boolean value that determines which template to use.
 
ControlTemplate TrueTemplate [get, set]
 Dependency properties for the templates to use when BoolValue is true
 
ControlTemplate FalseTemplate [get, set]
 Dependency properties for the templates to use when BoolValue is false
 

Private Member Functions

void UpdateTemplate ()
 Updates the template based on the current value of BoolValue
 

Static Private Member Functions

static void OnAnyPropertyChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)
 Callback for when any of the properties change.
 

Detailed Description

Content control that switches its template based on a boolean value.

Definition at line 9 of file BoolTemplateContentControl.cs.

Member Function Documentation

◆ OnAnyPropertyChanged()

static void Vereinsmeisterschaften.Controls.BoolTemplateContentControl.OnAnyPropertyChanged ( DependencyObject d,
DependencyPropertyChangedEventArgs e )
staticprivate

Callback for when any of the properties change.

Definition at line 46 of file BoolTemplateContentControl.cs.

◆ OnApplyTemplate()

override void Vereinsmeisterschaften.Controls.BoolTemplateContentControl.OnApplyTemplate ( )

Called when the control's template is applied.

This is where we set the initial template based on BoolValue

Definition at line 64 of file BoolTemplateContentControl.cs.

◆ UpdateTemplate()

void Vereinsmeisterschaften.Controls.BoolTemplateContentControl.UpdateTemplate ( )
private

Updates the template based on the current value of BoolValue

Definition at line 55 of file BoolTemplateContentControl.cs.

Member Data Documentation

◆ BoolValueProperty

readonly DependencyProperty Vereinsmeisterschaften.Controls.BoolTemplateContentControl.BoolValueProperty = DependencyProperty.Register(nameof(BoolValue), typeof(bool), typeof(BoolTemplateContentControl), new PropertyMetadata(false, OnAnyPropertyChanged))
static

Definition at line 21 of file BoolTemplateContentControl.cs.

◆ FalseTemplateProperty

readonly DependencyProperty Vereinsmeisterschaften.Controls.BoolTemplateContentControl.FalseTemplateProperty = DependencyProperty.Register(nameof(FalseTemplate), typeof(ControlTemplate), typeof(BoolTemplateContentControl), new PropertyMetadata(null, OnAnyPropertyChanged))
static

Definition at line 41 of file BoolTemplateContentControl.cs.

◆ TrueTemplateProperty

readonly DependencyProperty Vereinsmeisterschaften.Controls.BoolTemplateContentControl.TrueTemplateProperty = DependencyProperty.Register(nameof(TrueTemplate), typeof(ControlTemplate), typeof(BoolTemplateContentControl), new PropertyMetadata(null, OnAnyPropertyChanged))
static

Definition at line 31 of file BoolTemplateContentControl.cs.

Property Documentation

◆ BoolValue

bool Vereinsmeisterschaften.Controls.BoolTemplateContentControl.BoolValue
getset

Dependency property for the boolean value that determines which template to use.

True -> TrueTemplate False -> see FalseTemplate

Definition at line 16 of file BoolTemplateContentControl.cs.

◆ FalseTemplate

ControlTemplate Vereinsmeisterschaften.Controls.BoolTemplateContentControl.FalseTemplate
getset

Dependency properties for the templates to use when BoolValue is false

Definition at line 36 of file BoolTemplateContentControl.cs.

◆ TrueTemplate

ControlTemplate Vereinsmeisterschaften.Controls.BoolTemplateContentControl.TrueTemplate
getset

Dependency properties for the templates to use when BoolValue is true

Definition at line 26 of file BoolTemplateContentControl.cs.


The documentation for this class was generated from the following file: