ToggleButton.IsThreeState Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit une valeur qui indique si le contrôle prend en charge trois états.
public:
property bool IsThreeState { bool get(); void set(bool value); };
bool IsThreeState();
void IsThreeState(bool value);
public bool IsThreeState { get; set; }
var boolean = toggleButton.isThreeState;
toggleButton.isThreeState = boolean;
Public Property IsThreeState As Boolean
<togglebutton IsThreeState="bool"/>
Valeur de propriété
bool
True si le contrôle prend en charge trois états ; sinon, false. La valeur par défaut est false.
Remarques
ToggleButton et peut avoir trois états :
| State | Propriété | Valeur |
|---|---|---|
| vérifié | IsChecked | vrai |
| non coché | IsChecked | faux |
| indéterminé | IsChecked | null |
Pour que toggleButton signale l’état indéterminé, vous devez définir la propriété IsThreeState sur true.
Note
ToggleButton a le même état visuel pour les états indéterminés et désactivés. Les contrôles dérivés, tels que CheckBox, peuvent définir différents états visuels pour chaque état.