RenderOptions.SetBitmapScalingMode Método

Definición

Establece el valor de la propiedad adjunta BitmapScalingMode de un objeto de dependencia especificado.

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)

Parámetros

target
DependencyObject

Descendiente de UIElement o DrawingGroup en el que se va a establecer el valor de la propiedad BitmapScalingMode.

bitmapScalingMode
BitmapScalingMode

Nuevo valor en el que se va a establecer la propiedad.

Excepciones

El target especificado es null.

Ejemplos

En el ejemplo siguiente se muestra cómo establecer para BitmapScalingMode un Image objeto .

// 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)

Comentarios

Use el SetBitmapScalingMode método en un UIElement elemento o DrawingGroup descendiente que anima un mapa de bits.

Al animar la escala de un mapa de bits, el algoritmo para volver a muestrear la imagen de alta calidad predeterminada puede consumir suficientes recursos del sistema para que se produzca una degradación de la velocidad de fotogramas, lo que causa que las animaciones parpadeen. Estableciendo la propiedad BitmapScalingMode del objeto RenderOptions a LowQuality, puede crear una animación más suave al escalar un mapa de bits.

Se aplica a

Consulte también