MindFusion.Wpf Pack Programmer's Guide
PercentConverter Class
Remarks See Also
 





Converts an amount of the specified converter parameter equal to the percentage specified by the source value.

Namespace: MindFusion.Gauges.Wpf
Assembly: MindFusion.Gauges.Wpf

 Syntax

C#  Copy Code

public class PercentConverter : IValueConverter

Visual Basic  Copy Code

Public Class PercentConverter
    Implements IValueConverter

 Remarks

The PercentConverter can be very useful for specifying scalable values for standard properties. For example, you can define an ellipse with a StrokeThickness relative to the size of the ellipse.

 Example

The following sample code defines an Ellipse with StrokeThickness equal to 2% of its actual width:

XAML  Copy Code

<gauges:PercentConverter x:Key="PercentConverter" />

<Ellipse StrokeThickness="{Binding ActualWidth, RelativeSource={RelativeSource Self}, Converter={StaticResource PercentConverter}, ConverterParameter=2}" />

 Inheritance Hierarchy

System.Object
    MindFusion.Gauges.Wpf.PercentConverter

 See Also

PercentConverter Members
MindFusion.Gauges.Wpf Namespace