Visual.VisualXSnappingGuidelines 屬性


取得或設定 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.