Leadtools.Windows.Media.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.02.15
SwapColorsCommandBitmapEffect Class
See Also  Members   Example 
Leadtools.Windows.Media.Effects.Color Namespace : SwapColorsCommandBitmapEffect Class





Swaps the specified color channels.

Syntax

Visual Basic (Declaration) 
Public Class SwapColorsCommandBitmapEffect 
   Inherits RasterCommandBitmapEffect
Visual Basic (Usage)Copy Code
Dim instance As SwapColorsCommandBitmapEffect
C# 
public class SwapColorsCommandBitmapEffect : RasterCommandBitmapEffect 
Managed Extensions for C++ 
public __gc class SwapColorsCommandBitmapEffect : public RasterCommandBitmapEffect 
C++/CLI 
public ref class SwapColorsCommandBitmapEffect : public RasterCommandBitmapEffect 
XAML Property Element Usage 

SwapColorsCommandBitmapEffect ...

Example

Run the SwapColorsCommandBitmapEffect on an image.

Visual BasicCopy Code
Public Sub SwapColorsCommandBitmapEffectExample(ByVal element As FrameworkElement)
   Dim effect As SwapColorsCommandBitmapEffect = New SwapColorsCommandBitmapEffect()
   effect.Type = SwapColorsCommandBitmapEffectsType.GreenBlue
   element.BitmapEffect = effect
   'storyboard.Begin(element);
End Sub
C#Copy Code
public void SwapColorsCommandBitmapEffectExample(FrameworkElement element) 

   SwapColorsCommandBitmapEffect effect = new SwapColorsCommandBitmapEffect(); 
   effect.Type = SwapColorsCommandBitmapEffectsType.GreenBlue; 
   element.BitmapEffect = effect; 
   //storyboard.Begin(element); 
}
XAMLCopy Code
<!-- Inanimatable. --> 
<Page Title="CSAnimateEffect" Height="391" Width="300" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lteffects="clr-namespace:Leadtools.Windows.Media.Effects.Color;assembly=Leadtools.Windows.Media.Effects"> 
  <Grid> 
    <Image Margin="10,10,10,10" HorizontalAlignment="Center" VerticalAlignment="Center" Source="C:\Program Files\LEAD Technologies, Inc\LEADTOOLS 15\Images\slave.jpg"> 
      <Image.BitmapEffect> 
        <lteffects:SwapColorsCommandBitmapEffect x:Name="AnimatedBitmapEffect" Type="GreenBlue" /> 
      </Image.BitmapEffect> 
      <Image.Triggers> 
        <EventTrigger RoutedEvent="Image.Loaded"> 
          <BeginStoryboard> 
            <Storyboard></Storyboard> 
          </BeginStoryboard> 
        </EventTrigger> 
      </Image.Triggers> 
    </Image> 
  </Grid> 
</Page>

Remarks

  • This command changes the image data.
  • This command supports signed data images.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Freezable
            System.Windows.Media.Animation.Animatable
               System.Windows.Media.Effects.BitmapEffect
                  Leadtools.Windows.Media.Effects.RasterCommandBitmapEffect
                     Leadtools.Windows.Media.Effects.Color.SwapColorsCommandBitmapEffect

Requirements

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

See Also