Export (0) Print
Expand All

TileBrush.ViewboxUnits Property

Gets or sets a value that specifies whether the Viewbox value is relative to the bounding box of the TileBrush contents or whether the value is absolute.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Property ViewboxUnits As BrushMappingMode
<object ViewboxUnits="BrushMappingMode" .../>

Property Value

Type: System.Windows.Media.BrushMappingMode
A value that indicates whether the Viewbox value is relative to the bounding box of the TileBrush contents or whether it is an absolute value. The default value is RelativeToBoundingBox.

Identifier field

ViewboxUnitsProperty

Metadata properties set to true

None

A value of RelativeToBoundingBox indicates that the ViewboxUnits are relative to the bounding box of the content. Note that a value of Absolute specifies device independent pixels instead of device pixels, which are device dependent. Therefore, when a value of Absolute applies, each pixel represents 1/96th of an inch.

You must remember this pixel distinction when you specify the Viewbox of an ImageBrush that has a BitmapImage as its source. For example, when you use the standard pixel as a measure, a 300 by 300 pixel image is only one inch in width if the image resolution is 300 dots per inch. However, when you want to set an absolute value, you must set the Viewbox to (0, 0, 96, 96) in order to include the whole image.

You can specify the size and position of TileBrush content by using the Viewbox property. The ViewboxUnits property determines whether the Viewbox value is relative to the bounds of the TileBrush content or whether it is an absolute value.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft