共用方式為


BooleanToCustomVisibilityConverter Class

Definition

Converter from a boolean value to a Visibility constant. This convert allows the actual Visibility values to be specified as properties.

public ref class BooleanToCustomVisibilityConverter : Microsoft::VisualStudio::PlatformUI::ValueConverter<bool, System::Windows::Visibility>
[Windows::Foundation::Metadata::WebHostHidden]
class BooleanToCustomVisibilityConverter : Microsoft::VisualStudio::PlatformUI::ValueConverter<bool, System::Windows::Visibility>
public class BooleanToCustomVisibilityConverter : Microsoft.VisualStudio.PlatformUI.ValueConverter<bool,System.Windows.Visibility>
type BooleanToCustomVisibilityConverter = class
    inherit ValueConverter<bool, Visibility>
Public Class BooleanToCustomVisibilityConverter
Inherits ValueConverter(Of Boolean, Visibility)
Inheritance
BooleanToCustomVisibilityConverter

Constructors

BooleanToCustomVisibilityConverter()

Initializes a new instance of the BooleanToCustomVisibilityConverter. By default, this converter behaves like the WPF BooleanToVisibilityConverter unless the VisibilityIfTrue and VisibilityIfFalse properties are changed.

Properties

VisibilityIfFalse

Gets or sets the visibility state to evaluate to if the input value is false.

VisibilityIfTrue

Gets or sets the visibility state to evaluate to if the input value is true.

Methods

Convert(Boolean, Object, CultureInfo)

Convert a boolean value to a Visibility constant.

Convert(Object, Type, Object, CultureInfo)

Microsoft internal use only.

(Inherited from ValueConverter<TSource,TTarget>)
Convert(TSource, Object, CultureInfo)

Microsoft internal use only.

(Inherited from ValueConverter<TSource,TTarget>)
ConvertBack(Object, Type, Object, CultureInfo)

Microsoft internal use only.

(Inherited from ValueConverter<TSource,TTarget>)
ConvertBack(TTarget, Object, CultureInfo)

Microsoft internal use only.

(Inherited from ValueConverter<TSource,TTarget>)
ConvertBack(Visibility, Object, CultureInfo)

Converts a Visibility constant to a boolean value. This converter is invertible only if VisibilityIfTrue and VisibilityIfFalse map to different values (i.e. a one-to-one function). Similarly, multiplying by a scalar is not an invertible operation under certain conditions (if the scalar is zero).

Applies to