Condividi tramite


RenderOptions.SetBitmapScalingMode Metodo

Definizione

Imposta il valore della BitmapScalingMode proprietà associata in un oggetto di dipendenza specificato.

public:
 static void SetBitmapScalingMode(System::Windows::DependencyObject ^ target, System::Windows::Media::BitmapScalingMode bitmapScalingMode);
public static void SetBitmapScalingMode(System.Windows.DependencyObject target, System.Windows.Media.BitmapScalingMode bitmapScalingMode);
static member SetBitmapScalingMode : System.Windows.DependencyObject * System.Windows.Media.BitmapScalingMode -> unit
Public Shared Sub SetBitmapScalingMode (target As DependencyObject, bitmapScalingMode As BitmapScalingMode)

Parametri

target
DependencyObject

Oggetto UIElement o DrawingGroup discendente in cui impostare il valore della BitmapScalingMode proprietà.

bitmapScalingMode
BitmapScalingMode

Nuovo valore su cui impostare la proprietà.

Eccezioni

L'oggetto specificato target è null.

Esempio

Nell'esempio seguente viene illustrato come impostare l'oggetto BitmapScalingMode per un Image oggetto .

// Set the bitmap scaling mode for the image to render faster.
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality);
' Set the bitmap scaling mode for the image to render faster.
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality)

Commenti

Usare il SetBitmapScalingMode metodo su un UIElement oggetto o DrawingGroup discendente che anima una bitmap.

Quando si anima la scala di qualsiasi bitmap, l'algoritmo di ripetizione del campionamento di immagini di alta qualità predefinito può talvolta utilizzare risorse di sistema sufficienti per causare una riduzione della frequenza dei fotogrammi, causando in modo efficace le animazioni a stordire. Impostando la BitmapScalingMode proprietà dell'oggetto RenderOptions su LowQuality, è possibile creare un'animazione più fluida quando si ridimensiona una bitmap.

Si applica a

Vedi anche