RibbonScrollButtonVisibilityConverter.Convert Method
Converts a scroll bar visibility and scroll position to a Visibility value.
Namespace: Microsoft.Windows.Controls.Ribbon.Primitives
Assembly: RibbonControlsLibrary (in RibbonControlsLibrary.dll)
Syntax
'Declaration
Public Function Convert ( _
values As Object(), _
targetType As Type, _
parameter As Object, _
culture As CultureInfo _
) As Object
public Object Convert(
Object[] values,
Type targetType,
Object parameter,
CultureInfo culture
)
public:
virtual Object^ Convert(
array<Object^>^ values,
Type^ targetType,
Object^ parameter,
CultureInfo^ culture
) sealed
abstract Convert :
values:Object[] *
targetType:Type *
parameter:Object *
culture:CultureInfo -> Object
override Convert :
values:Object[] *
targetType:Type *
parameter:Object *
culture:CultureInfo -> Object
public final function Convert(
values : Object[],
targetType : Type,
parameter : Object,
culture : CultureInfo
) : Object
Parameters
- values
Type: System.Object[]
The values to be converted. Four values are expected, one Visibility object that represents scroll bar visibility and three Double values that represent the scroll bar position.
- targetType
Type: System.Type
The type to be converted to. The Visibility type is expected.
- parameter
Type: System.Object
The desired percentage that the ribbon is scrolled to the right before the scroll button is hidden. A Double is expected.
- culture
Type: System.Globalization.CultureInfo
The culture to use when converting.
Return Value
Type: System.Object
A Visibility object representing the visibility of the scroll button.
Implements
IMultiValueConverter.Convert(Object[], Type, Object, CultureInfo)
Remarks
The three Double values that represent the scroll bar position are the HorizontalOffset, ExtentWidth, and ViewportWidth property values of the RibbonTabsPanel or RibbonTabHeadersPanel. These properties contain values from the panel’s internal ScrollViewer.
The parameter value represents the desired percentage that the ribbon is scrolled to the right before the scroll button is hidden. By default, the left scroll button passes 0 as the parameter, and it is hidden when the ribbon is scrolled 0 percent to the right. The right scroll button passes 100 as the parameter, and it is hidden when the ribbon is scrolled 100 percent to the right.
Passing in nulla null reference (Nothing in Visual Basic) or parameters of unexpected types may cause this method to return UnsetValue.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.