C# Class Microsoft.Phone.Controls.ToggleSwitch

Inheritance: System.Windows.Controls.ContentControl
Afficher le fichier Open project: nokiadatagathering/WP7-Official Class Usage Examples

Méthodes publiques

Свойство Type Description
HeaderProperty System.Windows.DependencyProperty
HeaderTemplateProperty System.Windows.DependencyProperty
IsCheckedProperty System.Windows.DependencyProperty
SwitchForegroundProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
ChangeVisualState void
OnChecked void
OnClick void
OnIndeterminate void
OnIsCheckedChanged void
OnUnchecked void
SetDefaultContent void

Méthodes publiques

Méthode Description
OnApplyTemplate ( ) : void

Gets all the template parts and initializes the corresponding state.

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object .

ToggleSwitch ( ) : System

Initializes a new instance of the ToggleSwitch class.

Méthodes protégées

Méthode Description
OnContentChanged ( object oldContent, object newContent ) : void

Makes the content an "Off" or "On" string to match the state if the content is set to null in the design tool.

Private Methods

Méthode Description
ChangeVisualState ( bool useTransitions ) : void

Change the visual state.

OnChecked ( object sender, RoutedEventArgs e ) : void

Mirrors the E:System.Windows.Controls.Primitives.ToggleButton.Checked event.

OnClick ( object sender, RoutedEventArgs e ) : void

Mirrors the E:System.Windows.Controls.Primitives.ToggleButton.Click event.

OnIndeterminate ( object sender, RoutedEventArgs e ) : void

Mirrors the E:System.Windows.Controls.Primitives.ToggleButton.Indeterminate event.

OnIsCheckedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Invoked when the IsChecked DependencyProperty is changed.

OnUnchecked ( object sender, RoutedEventArgs e ) : void

Mirrors the E:System.Windows.Controls.Primitives.ToggleButton.Unchecked event.

SetDefaultContent ( ) : void

Makes the content an "Off" or "On" string to match the state.

Method Details

OnApplyTemplate() public méthode

Gets all the template parts and initializes the corresponding state.
public OnApplyTemplate ( ) : void
Résultat void

OnContentChanged() protected méthode

Makes the content an "Off" or "On" string to match the state if the content is set to null in the design tool.
protected OnContentChanged ( object oldContent, object newContent ) : void
oldContent object The old content.
newContent object The new content.
Résultat void

ToString() public méthode

Returns a T:System.String that represents the current T:System.Object .
public ToString ( ) : string
Résultat string

ToggleSwitch() public méthode

Initializes a new instance of the ToggleSwitch class.
public ToggleSwitch ( ) : System
Résultat System

Property Details

HeaderProperty public_oe static_oe property

Identifies the Header DependencyProperty.
public static DependencyProperty,System.Windows HeaderProperty
Résultat System.Windows.DependencyProperty

HeaderTemplateProperty public_oe static_oe property

Identifies the HeaderTemplate DependencyProperty.
public static DependencyProperty,System.Windows HeaderTemplateProperty
Résultat System.Windows.DependencyProperty

IsCheckedProperty public_oe static_oe property

Identifies the IsChecked DependencyProperty.
public static DependencyProperty,System.Windows IsCheckedProperty
Résultat System.Windows.DependencyProperty

SwitchForegroundProperty public_oe static_oe property

Identifies the SwitchForeground DependencyProperty.
public static DependencyProperty,System.Windows SwitchForegroundProperty
Résultat System.Windows.DependencyProperty