FigureUnitType Enumeration

.NET Framework 3.0
Describes the unit type associated with the width or height of a FigureLength.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

Syntax

```public enum FigureUnitType
```
```public enum FigureUnitType
```
```public enum FigureUnitType
```
```<object property="EnumerationValue" .../>
```

Members

Member nameDescription
AutoDefault value when the FigureLength is not specified which creates a value for the width or height of the Figure that is calculated without constraints. Note: When FigureUnitType is set to Auto, the Value property of FigureLength is set to 1.
ColumnThe value of the width or height of the Figure is expressed as a fraction (including fractions greater then 1) of the width of the column the Figure is in.
ContentThe value of the width or height of the Figure is expressed as a fraction (including fractions greater then 1) of the content width of the Figure. Note: Note: When FigureUnitType is set to Content, the Value property of FigureLength must be set to a value between 0 and 1
PageThe value of the width or height of the Figure is expressed as a fraction (including fractions greater then 1) of the page width of that the Figure is in. Note: Note: When FigureUnitType is set to Page, the Value property of FigureLength must be set to a value between 0 and 1
PixelThe value of the width or height of the Figure is expressed in pixels (96 pixels-per-inch).

Example

In the following example, when the user clicks on the Figure, the Width of the Figure decreases. Below is the XAML for the sample.

```<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.FigureLengthExample" >

<FlowDocument >
<Paragraph>
Raw text inside the paragraph
<Figure Name="myFigure" Width="300">
<Paragraph FontStyle="Italic" MouseDown="OnMouseDownDecreaseWidth" >
Text inside of paragraph that is inside Figure...
</Paragraph>
</Figure>
</Paragraph>
</FlowDocument>

</Page>

```

Below is the code used to decrease the Width of the Figure using the Pixel to specify the unit type.

```using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace SDKSample
{
public partial class FigureLengthExample : Page
{

void OnMouseDownDecreaseWidth(object sender, MouseButtonEventArgs args)
{
FigureLength myFigureLength = myFigure.Width;
double widthValue = myFigureLength.Value;
if (widthValue > 0)
{
myFigure.Width = new FigureLength((widthValue - 10), FigureUnitType.Pixel);
}
}
}
}

```

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0