Compartir vía


UIElement.Effect Propiedad

Definición

Obtiene o establece el efecto de mapa de bits que se va a aplicar a .UIElement Es una propiedad de dependencia.

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

Valor de propiedad

que Effect representa el efecto de mapa de bits.

Ejemplos

En el código XAML siguiente se muestra cómo asignar un personalizado ShaderEffect a la Effect propiedad .

<Window x:Class="ShaderEffectDemo.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ShaderEffectDemo"
    Title="Window1" Height="300" Width="300">
    <Window.Resources>
        <local:ThresholdEffect x:Key="thresholdEffect" Threshold="0.25" BlankColor="Orange" />
    </Window.Resources>
    
    <Grid Effect="{StaticResource thresholdEffect}">

    </Grid>
</Window>

Comentarios

Use la Effect propiedad para aplicar un efecto de mapa de bits a .UIElement

Información de la propiedad dependency

Elemento Importancia
Campo identificador EffectProperty
Propiedades de metadatos establecidas en true Ninguno

Se aplica a

Consulte también