Viewport2DVisual3D.CacheMode Viewport2DVisual3D.CacheMode Viewport2DVisual3D.CacheMode Viewport2DVisual3D.CacheMode Property

定義

取得或設定 Viewport2DVisual3D 的快取表示。Gets or sets a cached representation of the Viewport2DVisual3D.

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

屬性值

保存 CacheMode 之快取表示的 Viewport2DVisual3DA CacheMode that holds a cached representation of the Viewport2DVisual3D.

備註

當您CacheMode需要為轉譯耗費時間的內容增加效能時, 請設定屬性。Set the CacheMode property when you need to increase performance for content that is time-consuming to render. 如需詳細資訊,請參閱BitmapCacheFor more information, see BitmapCache.

Viewport2DVisual3D類別會將立體內容投射到 2d, 以正確地調整3-d 元素中的2-d 內容大小。The Viewport2DVisual3D class projects 3-D content into 2-D to size the 2-D content in the 3-D element correctly.

因為快取一定會依賴元素的大小, 而不是套用到它的轉換, 所以當您CacheMode設定屬性時, 一開始您的內容可能會晃動。Because caching always relies on the element's size, instead of the transform applied to it, when you set the CacheMode property, initially your content may appear pixilated. 這是因為它所 upsampled 的大小遠比快取時所用的還要大。This is because it is being upsampled to a much larger size than it was cached at. 您可以藉由設定HeightWidth屬性來增加2d 視覺效果的本機大小, 藉此修正這種情況。You can correct this situation by increasing the local size of your 2-D visual by setting the Height or Width properties. 此外, 您可以在RenderAtScale CacheMode上增加, 直到內容達到可接受的清楚程度為止。Also, you can increase the RenderAtScale on the CacheMode until the content reaches an acceptable level of clarity.

適用於

另請參閱