Leadtools.Windows.Controls Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.03.25
BitmapEffectBehavior Property
See Also  Example
Leadtools.Windows.Controls Namespace > BitmapSourceViewer Class : BitmapEffectBehavior Property





Gets and sets a value that determines how to apply a BitmapEffect on the control.

Syntax

Visual Basic (Declaration) 
Public Property BitmapEffectBehavior As BitmapEffectBehavior
Visual Basic (Usage)Copy Code
Dim instance As BitmapSourceViewer
Dim value As BitmapEffectBehavior
 
instance.BitmapEffectBehavior = value
 
value = instance.BitmapEffectBehavior
C# 
public BitmapEffectBehavior BitmapEffectBehavior {get; set;}
Managed Extensions for C++ 
public: __property BitmapEffectBehavior get_BitmapEffectBehavior();
public: __property void set_BitmapEffectBehavior( 
   BitmapEffectBehavior value
);
C++/CLI 
public:
property BitmapEffectBehavior BitmapEffectBehavior {
   BitmapEffectBehavior get();
   void set (BitmapEffectBehavior value);
}
XAML Attributes Usage 

<object BitmapEffectBehavior=BitmapEffectBehavior .../>

Dependency Property Information 

Identifier field

BitmapEffectBehaviorProperty

Metadata properties set to true

None

Return Value

A BitmapEffectBehavior enumeration value that determines how to apply a BitmapEffect on the BitmapSourceViewer control. Default value is BitmapEffectBehavior.All.

Example

This example shows a method to change the BitmapEffectBehavior

Visual BasicCopy Code
Public Sub BitmapSourceViewer_BitmapEffectBehavior(ByVal viewer As BitmapSourceViewer)
   viewer.BitmapEffectBehavior = BitmapEffectBehavior.ImageOnly
   viewer.BitmapEffect = New EmbossBitmapEffect()
End Sub
C#Copy Code
public void BitmapSourceViewer_BitmapEffectBehavior(BitmapSourceViewer viewer) 

   viewer.BitmapEffectBehavior = BitmapEffectBehavior.ImageOnly; 
   viewer.BitmapEffect = new EmbossBitmapEffect(); 
}
XAMLCopy Code
<Window x:Class="WPFSamples.BitmapSourceViewer" Height="600" Width="800" Title="BitmapEffectBehavior Sample" 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:BitmapSourceViewer Name="theViewer" Source="file:///C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\slave.jpg" DockPanel.Dock="Bottom" HorizontalAlignment="Center" VerticalAlignment="Bottom" BitmapEffectBehavior="ImageOnly"> 
      <Leadtools_Windows_Controls:BitmapSourceViewer.BitmapEffect> 
        <EmbossBitmapEffect /> 
      </Leadtools_Windows_Controls:BitmapSourceViewer.BitmapEffect> 
    </Leadtools_Windows_Controls:BitmapSourceViewer> 
  </DockPanel> 
</Window>

Remarks

If the value for BitmapEffectBehavior is BitmapEffectBehavior.ImageOnly, then the bitmap effect will be applied to the image only. Also, if the image contains a geometry, the bitmap effect 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