-
Notifications
You must be signed in to change notification settings - Fork 3
RectConverter
JaykeBird edited this page Feb 21, 2023
·
4 revisions
Back to home | Back to Reference | View raw text
A MultiValueConverter that takes 4 values and creates a Rect. This class can be used to get around the fact that a Rect cannot be used for XAML binding.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.RectConverter[[RectConverter]]
end
subgraph System.Windows.Data
System.Windows.Data.IMultiValueConverter[[IMultiValueConverter]]
end
System.Windows.Data.IMultiValueConverter --> SolidShineUi.RectConverter
| Returns | Name |
|---|---|
object |
Convert(object``[] values, Type targetType, object parameter, CultureInfo culture)Convert 4 doubles to a Rect structure. |
object``[] |
ConvertBack(object value, Type``[] targetTypes, object parameter, CultureInfo culture)Convert a Rect into an array of doubles representing its X, Y, Width, and Height values respectively. |
A MultiValueConverter that takes 4 values and creates a Rect. This class can be used to get around the fact that a Rect cannot be used for XAML binding.
IMultiValueConverter
public RectConverter()public virtual object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)| Type | Name | Description |
|---|---|---|
object``[] |
values | The four doubles to use to measure the Rect's X, Y, Width, and Height values respectively. |
Type |
targetType | Not used, always returns a Rect |
object |
parameter | Not used |
CultureInfo |
culture | Not used |
Convert 4 doubles to a Rect structure.
public virtual object ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)| Type | Name | Description |
|---|---|---|
object |
value | |
Type``[] |
targetTypes | |
object |
parameter | |
CultureInfo |
culture |
Convert a Rect into an array of doubles representing its X, Y, Width, and Height values respectively.
| Name | Description |
|---|---|
| InvalidCastException | Thrown if the value passed in is not a Rect structure. |
Generated with ModularDoc