TileBrush.ViewboxUnits Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
property System::Windows::Media::BrushMappingMode ViewboxUnits { System::Windows::Media::BrushMappingMode get(); void set(System::Windows::Media::BrushMappingMode value); };
public System.Windows.Media.BrushMappingMode ViewboxUnits { get; set; }
member this.ViewboxUnits : System.Windows.Media.BrushMappingMode with get, set
Public Property ViewboxUnits As BrushMappingMode
Property Value
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.
Remarks
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.
Dependency Property Information
Identifier field | ViewboxUnitsProperty |
Metadata properties set to true |
None |