Share via


AnyTrueToVisibleConverter.Convert Method

If any value is true bool, returns Visibility.Visible. Any other value combination including null or an empty list returns Visibility.Collapsed (or Visibility.Hidden if parameter includes "Hidden").

If the parameter contains "Not", "!", or "Invert", the result from the bool evaluation is inverted before it is converted to Visibility.

Namespace:  Microsoft.TeamFoundation.Controls.WPF.Converters
Assembly:  Microsoft.TeamFoundation.Controls (in Microsoft.TeamFoundation.Controls.dll)

Syntax

'Declaration
Public Overridable Function Convert ( _
    values As Object(), _
    targetType As Type, _
    parameter As Object, _
    culture As CultureInfo _
) As Object
public virtual Object Convert(
    Object[] values,
    Type targetType,
    Object parameter,
    CultureInfo culture
)
public:
virtual Object^ Convert(
    array<Object^>^ values, 
    Type^ targetType, 
    Object^ parameter, 
    CultureInfo^ culture
)
abstract Convert : 
        values:Object[] * 
        targetType:Type * 
        parameter:Object * 
        culture:CultureInfo -> Object  
override Convert : 
        values:Object[] * 
        targetType:Type * 
        parameter:Object * 
        culture:CultureInfo -> Object
public function Convert(
    values : Object[], 
    targetType : Type, 
    parameter : Object, 
    culture : CultureInfo
) : Object

Parameters

  • targetType
    Type: System.Type

    output type - Must be Visibility

  • parameter
    Type: System.Object

    comma-separated options. "Not", "!", or "Invert" to invert the bool evaluation result before converting to Visibility. "Hidden" to have Visibility.Hidden instead of the default Visibility.Collapsed

Return Value

Type: System.Object
converted Visibility

Implements

IMultiValueConverter.Convert(array<Object[], Type, Object, CultureInfo)

.NET Framework Security

See Also

Reference

AnyTrueToVisibleConverter Class

Microsoft.TeamFoundation.Controls.WPF.Converters Namespace