TileBrush.ViewboxUnits 属性

定义

获取或设置一个值,该值指定 Viewbox 值是相对于 TileBrush 内容的边界框而言,还是绝对值。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.

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

属性值

一个值,该值指示 Viewbox 值是相对于 TileBrush 内容的边界框而言,还是绝对值。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. 默认值为 RelativeToBoundingBoxThe default value is RelativeToBoundingBox.

注解

RelativeToBoundingBox 指示 @no__t 相对于内容的边界框。A value of RelativeToBoundingBox indicates that the ViewboxUnits are relative to the bounding box of the content. 请注意,值 Absolute 指定设备无关的像素,而不是设备像素,它们依赖于设备。Note that a value of Absolute specifies device independent pixels instead of device pixels, which are device dependent. 因此,当 Absolute 的值应用时,每个像素表示一英寸的 1/96th 每。Therefore, when a value of Absolute applies, each pixel represents 1/96th of an inch.

指定 @no__t 为 BitmapImage 作为其源的的 @no__t 时,必须记住此像素差别。You must remember this pixel distinction when you specify the Viewbox of an ImageBrush that has a BitmapImage as its source. 例如,使用标准像素作为度量值时,如果图像分辨率为每英寸300点,则 300 x 300 像素的图像宽度只是宽度的一英寸。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. 但是,如果要设置一个绝对值,则必须将 @no__t 0 设置为(0,0,96,96),以便包括整个映像。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.

您可以使用 @no__t 属性指定 @no__t 的内容的大小和位置。You can specify the size and position of TileBrush content by using the Viewbox property. @No__t-0 属性确定 @no__t 值是否相对于 @no__t 2 内容的边界,或该值是否为绝对值。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
元数据属性设置为 trueMetadata properties set to true NoneNone

适用于

另请参阅