Visual.VisualScrollableAreaClip Visual.VisualScrollableAreaClip Visual.VisualScrollableAreaClip Visual.VisualScrollableAreaClip Property


取得或設定 Visual 的可捲動裁剪區域。Gets or sets a clipped scrollable area for the Visual.

public:  property Nullable<System::Windows::Rect> VisualScrollableAreaClip {  protected public:
Nullable<System::Windows::Rect> get(); protected:
 void set(Nullable<System::Windows::Rect> value); };
public Nullable<System.Windows.Rect> VisualScrollableAreaClip { protected internal get; protected set; }
member this.VisualScrollableAreaClip : Nullable<System.Windows.Rect> with get, set
Public Property VisualScrollableAreaClip As Nullable(Of Rect)


表示可捲動裁剪區域的 Rect,如果沒有指派裁剪區域,則為 nullA Rect that represents the scrollable clipping area, or null if no clipping area is assigned.


設定VisualScrollableAreaClip屬性,來啟用加速捲動時在軟體中轉譯。Set the VisualScrollableAreaClip property to enable accelerated scrolling when rendering in software. 這是用於遠端轉譯案例,例如執行透過遠端桌面或虛擬機器中執行。This is useful in remote rendering scenarios, such as running over Remote Desktop or running in a virtual machine. 將捲動其子系的父項目上設定此屬性。Set this property on the parent element whose children will be scrolled. 設定VisualScrollableAreaClip屬性沒有任何作用,當轉譯是透過硬體加速。Setting the VisualScrollableAreaClip property has no effect when rendering is hardware accelerated.

VisualScrollableAreaClip屬性可讓特定的進階案例。The VisualScrollableAreaClip property enables specific, advanced scenarios. 下列清單顯示適用於當您使用的警告VisualScrollableAreaClip屬性。The following list shows the caveats that apply when you use the VisualScrollableAreaClip property.

  • 捲動區域的背景必須是不透明的或捲動成品將會發生。The background of the scrolled area must be opaque, or scrolling artifacts will occur.

  • VisualScrollableAreaClip屬性可讓您加速捲動僅當 WPF 呈現在軟體中。The VisualScrollableAreaClip property accelerates scrolling only when WPF is rendering in software. 比方說,當應用程式執行的是透過遠端桌面或虛擬機器中本機執行時,就會發生這種情況。For example, this situation occurs when the application is running over Remote Desktop or running locally in a virtual machine.

  • 在硬體中轉譯時,捲動行為不變。The scrolling behavior is unchanged when rendering in hardware. 若要避免捲動行為的差異,您應該保留VisualScrollableAreaClip硬體和軟體啟用的屬性。To prevent differences in scrolling behavior, you should keep the VisualScrollableAreaClip property enabled for both hardware and software.

  • 旋轉及傾斜轉換加速的停用捲動。Rotate and skew transforms disable accelerated scrolling. 縮放轉換和水平或垂直捲動區域上方的翻譯正確運作,並不會停用捲動加速。Scale transforms and horizontal or vertical translations above the scrolled region work correctly and do not disable scrolling acceleration.

  • 變更樹狀子目錄或觸發的可捲動區域來進行重繪透過動畫的組件行為如預期般運作,但會失去加速捲動重繪區域的優點。Changing the subtree or triggering parts of the scrollable area to redraw via animation behave as expected, but lose the benefit of accelerated scrolling for the redrawn area. 任何在相同的畫面格期間失效的捲動的區域的動畫中的捲動,就會發生可消除這種最佳化的優點。Any animation that invalidates the scrolled area during the same frame in which scrolling occurs eliminates the benefit of this optimization.

  • VisualScrollableAreaClip矩形向內貼齊像素。The VisualScrollableAreaClip rectangle snaps inward to pixels. 因此,貼齊捲動的矩形的大小一律為小於或等於您已設定的大小。Therefore, the snapped size of the scrolling rectangle is always less than or equal to the size you have set.

  • 向下貼齊位移。Offsets snap downward. 這表示先前的差異進行位移,而且目前的貼齊的位移一律是像素為單位的整數。This means that the difference of the previous snapped offset and current snapped offset is always an integer number of pixels.

  • 點擊的測試可能會相差一個像素到。Hit tests can be off by up to a pixel.

  • 版面配置進位應該開啟,因為它會確保可捲動區域和界限的視窗用戶端區域邊緣會貼齊像素界限,導致正確對齊。Layout rounding should be turned on, because it ensures that the edges of scrollable areas and the boundary window client area are snapped to pixel boundaries, resulting in correct alignment.

  • 捲動加速不適用於多層式視窗。Scrolling acceleration does not work on layered windows. 這表示在哪個 AllowTransparency windows = = true,window.windowstyle = = none,依此類推。This means windows in which AllowTransparency == true, window.windowstyle == none, and so on.

  • 捲動加速不全視窗呈現期間會發生。Scrolling acceleration does not occur during full-window rendering.

  • 捲動加速無法運作時的視窗是橫跨兩個監視器。Scrolling acceleration does not work when the window straddles two monitors.

  • 捲動加速無法運作時的捲動項目之父鏈結的中繼呈現目標。Scrolling acceleration does not work in the presence of intermediate render targets in the parent chain of the scrolled element. 下列清單顯示其中某些中繼呈現目標。The following list shows some of these intermediate render targets.

    • 剪輯Clips

    • 效果Effects

    • DrawingBrushesDrawingBrushes

    • VisualBrushesVisualBrushes

    • OpacityMasksOpacityMasks

    • 不透明度Opacity

  • 只有一個加速的捲動可能會發生每個畫面。Only one accelerated scroll can happen per frame. 可以有多個加速的捲動區域,但其中只有一個元件可以在範圍內執行加速的捲軸。There can be multiple accelerated scroll areas, but only one of them can perform an accelerated scroll during a frame. 要捲動的區域為不定。Which area is scrolled is indeterminate.

  • 捲動加速支援以上未與內容的其餘部分捲動捲軸的區域 (以 z 軸順序) 的內容。Scrolling acceleration supports content above the scrolling region (in z-order) that is not scrolled with the rest of the content. 系統計算所有必要的已變更區域,並完成加速的捲軸,但它會傳送數個額外的點陣圖,透過網路移動不小心捲動的部分將其正確的位置上畫面。The system calculates all necessary dirty regions and completes the accelerated scroll, but it sends several additional bitmaps over the wire to move the unintentionally scrolled portion back to its correct position on screen.