EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.
Ce sujet n'a pas encore été évalué - Évaluez ce sujet

UIElement.CacheMode Property

April 12, 2014

Gets or sets a value that indicates that rendered content should be cached when possible.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
'Déclaration
Public Property CacheMode As CacheMode
<uiElement>
  <uiElement.CacheMode>
    singleBitmapCache
  </uiElement.CacheMode>
</uiElement>

XAML Values

singleBitmapCache

Exactly one BitmapCache object element, generally with the RenderAtScale attribute set. Technically, the XAML accepts any CacheMode object value, but BitmapCache is the only existing practical derived class in the Windows Phone core API.

Property Value

Type: System.Windows.Media.CacheMode
A value that indicates that rendered content should be cached when possible. If you specify a value of CacheMode, rendering operations from RenderTransform and Opacity execute on the graphics processing unit (GPU), if available. The default is Nothing, which does not enable a cached composition mode.

Dependency property identifier field: CacheModeProperty

The XAML usage shown is the only practical available usage in Windows Phone core libraries. In theory, other CacheMode classes could be written to fill the CacheMode value, but these would be custom classes. See BitmapCache for the attributes you might set on the BitmapCache object element value.

Windows Phone has a different set of operations that can use GPU acceleration; for more information, see Essential graphics, visual indicators, and notifications for Windows Phone.

The following XAML uses a BitmapCache to set CacheMode for a MediaElement.

<MediaElement>
  <MediaElement.CacheMode>
    <BitmapCache RenderAtScale="4"/>
  </ MediaElement.CacheMode>
</MediaElement>

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Cela vous a-t-il été utile ?
(1500 caractères restants)
Merci pour vos suggestions.
Afficher:
© 2014 Microsoft. Tous droits réservés.