Edit

Share via


RibbonScrollButtonVisibilityConverter.Convert Method

Definition

Converts a scroll bar visibility and scroll position to a Visibility value.

public:
 virtual System::Object ^ Convert(cli::array <System::Object ^> ^ values, Type ^ targetType, System::Object ^ parameter, System::Globalization::CultureInfo ^ culture);
public object Convert (object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture);
abstract member Convert : obj[] * Type * obj * System.Globalization.CultureInfo -> obj
override this.Convert : obj[] * Type * obj * System.Globalization.CultureInfo -> obj
Public Function Convert (values As Object(), targetType As Type, parameter As Object, culture As CultureInfo) As Object

Parameters

values
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

The type to be converted to. The Visibility type is expected.

parameter
Object

The desired percentage that the ribbon is scrolled to the right before the scroll button is hidden. A Double is expected.

culture
CultureInfo

The culture to use when converting.

Returns

A Visibility object representing the visibility of the scroll button.

Implements

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 null or parameters of unexpected types may cause this method to return UnsetValue.

Applies to