Visual.VisualXSnappingGuidelines Visual.VisualXSnappingGuidelines Visual.VisualXSnappingGuidelines Visual.VisualXSnappingGuidelines Property

定义

获取或设置 X 坐标(垂直)准线集合。Gets or sets the x-coordinate (vertical) guideline collection.

public:  property System::Windows::Media::DoubleCollection ^ VisualXSnappingGuidelines {  protected public:
System::Windows::Media::DoubleCollection ^ get(); protected:
 void set(System::Windows::Media::DoubleCollection ^ value); };
public System.Windows.Media.DoubleCollection VisualXSnappingGuidelines { protected internal get; protected set; }
member this.VisualXSnappingGuidelines : System.Windows.Media.DoubleCollection with get, set
Public Property VisualXSnappingGuidelines As DoubleCollection

属性值

可视对象的 X 坐标准线集合。The x-coordinate guideline collection of the visual.

注解

像素对齐是内容布局固定到的过程, 以便在特定于设备的像素上呈现对象边缘。Pixel snapping is the process in which content layout is fixed so that object edges are rendered on device-specific pixels. WPFWPF 图形系统使用与设备无关的单元来使分辨率和设备独立。The WPFWPF graphics system uses device-independent units to enable resolution and device independence. 每个与设备无关的像素都会随着系统的 每英寸点数 (dpi)dots per inch (dpi) 设置自动进行缩放。Each device independent pixel automatically scales with the system's 每英寸点数 (dpi)dots per inch (dpi) setting. 这为 WPFWPF 应用程序提供了不同 dpidpi 设置的适当缩放,并使应用程序自动感知 dpidpiThis provides WPFWPF applications proper scaling for different dpidpi settings and makes the application automatically dpidpi-aware.

但是, 这dpidpi种独立性可能会因为抗锯齿而产生不规则边缘渲染。However, this dpidpi independence can create irregular edge rendering due to anti-aliasing. 当边缘的位置落在设备像素中间而不是设备像素之间时, 可能会出现这些项目, 这些项目通常被视为模糊或 "软" 边缘。These artifacts, commonly seen as blurry or "soft" edges, can occur when the location of an edge falls in the middle of a device pixel rather than between device pixels. 若要解决此问题WPFWPF , 可为可视化树中的对象边缘提供一种 "对齐" 到设备像素的方式, 从而消除抗锯齿产生的软边缘。To address this issue, WPFWPF provides a way for object edges in a visual tree to "snap" to device pixels, eliminating the soft edges produced by anti-aliasing.

适用于

另请参阅