Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - LEADTOOLS WPF | Help Version 16.5.9.25
BitmapEffect Property
See Also  Example
Leadtools.Windows.Controls Namespace > BitmapSourceViewerElement Class : BitmapEffect Property





Gets or sets the bitmap effect for the BitmapSourceViewerElement. This is a dependency property.

Syntax

Visual Basic (Declaration) 
Public Property BitmapEffect As BitmapEffect
Visual Basic (Usage)Copy Code
Dim instance As BitmapSourceViewerElement
Dim value As BitmapEffect
 
instance.BitmapEffect = value
 
value = instance.BitmapEffect
C# 
public BitmapEffect BitmapEffect {get; set;}
C++/CLI 
public:
property BitmapEffect BitmapEffect {
   BitmapEffect get();
   void set (BitmapEffect value);
}
XAML Syntax 
For XAML information, see the BitmapEffect type.

Dependencies Property Information 

Identifier field

BitmapEffectProperty

Metadata properties set to true

AffectsRender

XAML Syntax 
For XAML information, see the BitmapEffect type.

Dependencies Property Information 

Identifier field

BitmapEffectProperty

Metadata properties set to true

AffectsRender

Return Value

The bitmap effect value for the BitmapSourceViewerElement. The default value is a null.

Example

This example uses the BitmapEffect property to apply a bitmap effect on a specified geometry.

Visual BasicCopy Code
Public Sub BitmapSourceViewerElement_BitmapEffect(ByVal viewer As BitmapSourceViewerElement)
   viewer.Geometry = New RectangleGeometry(New Rect(0, 0, 200, 200))
   viewer.BitmapEffect = New EmbossBitmapEffect()
End Sub
C#Copy Code
public void BitmapSourceViewerElement_BitmapEffect(BitmapSourceViewer viewer) 

   viewer.Geometry = new RectangleGeometry(new Rect(0, 0, 200, 200)); 
   viewer.BitmapEffect = new EmbossBitmapEffect(); 
}
XAMLCopy Code
<Window x:Class="WPFSamples.BitmapSourceViewerElement" Height="600" Width="800" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Leadtools_Windows_Controls="clr-namespace:Leadtools.Windows.Controls;assembly=Leadtools.Windows.Controls"> 
  <DockPanel> 
    <Leadtools_Windows_Controls:BitmapSourceViewerElement Name="theImage" Source="file:///C:\Program Files\LEAD Technologies\LEADTOOLS 16\Images\slave.jpg" DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Bottom"> 
      <Leadtools_Windows_Controls:BitmapSourceViewerElement.BitmapEffect> 
        <EmbossBitmapEffect /> 
      </Leadtools_Windows_Controls:BitmapSourceViewerElement.BitmapEffect> 
      <Leadtools_Windows_Controls:BitmapSourceViewerElement.Geometry> 
        <RectangleGeometry Rect="0,0,200,200" /> 
      </Leadtools_Windows_Controls:BitmapSourceViewerElement.Geometry> 
    </Leadtools_Windows_Controls:BitmapSourceViewerElement> 
  </DockPanel> 
  <Window.Title> 
              "Apply a bitmap effect on a specified geometry" 
          </Window.Title> 
</Window>

Remarks

If the Geometry property is not null the BitmapEffect will be applied to this Geometry only.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also