Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
WPF_Blend_adding_bitmap_effect

Take the following steps to create and run a program in Microsoft Expression Blend to add a bitmap effect  using LEADTOOLS SpecialEffects.

  1. Start Microsoft Expression Blend. 
  2. In File-->Open Project find the project ImageBrowser you created in previous tutorial.  Find the ImageBrowser.csproj file name and choose Open
  3. Choose Objects and Timeline-->LayoutRoot,then BitmapSourceViewer.
  4. On the right side of the screen, find and select Properties-->Appearance.   
  5. Select the downward arrow located at the bottom of the Appearance box to show advanced properties. 
  6. Choose BitmapEffect-->New.  Select Object window will appear. Find  Leadtools.Windows.Media.Effects-->Leadtools.Windows.Media.Effects.SpecialEffects--> ColoredBallsCommandBitmapEffect, select it and choose OK.
  7. Build, and Run the program to test it (Project-->Test Project or F5).
  8. Next add multiple effects by repeating steps 4-5.
  9. Choose BitmapEffect-->New,find the dropdown menu button and select it, then choose BitmapEffectGroup.
  10. Choose Children(Collection)--> ... (button to Edit Items in this collection).
  11. Notice the items and properties windows are empty.  We are going to add some items to the children collection.  Those children items will be as many effects as desired.
  12. Choose Add another item button.  A Select Object window will show. Select: Leadtools.Windows.Media.Effects-->Leadtools.Windows.Media.Effects.SpecialEffects--> ColoredBallsCommandBitmapEffect Choose OK to add item, notice the item is added to the list of children and an index [0] is assigned to it.
  13. Choose Add another item button.  A Select Object window will show. Select: Leadtools.Windows.Media.Effects-->Leadtools.Windows.Media.Effects.SpecialEffects--> BricksTextureCommandBimapEffect Choose OK to add item, notice the item is added to the list of children and an index [1] is assigned to it.
  14. In the BitmapEffect Collection Editor:Children window, once the two effects are added, choose OK.
  15. Build, and Run the program to test it (Project-->Test Project or F5).
  16. To switch from one effect to another, choose Children(Collection)--> ... (button to Edit Items in this collection). Select either up  or down arrow, then choose OK.  
  17. [Window1.xaml]
    			<Window 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" x:Class="ImageBrowser.Window1" x:Name="Window" Title="Window1" Width="640" Height="480" 
                                  xmlns:Leadtools_Windows_Media_Effects_SpecialEffects="clr-namespace:Leadtools.Windows.Media.Effects.SpecialEffects;assembly=Leadtools.Windows.Media.Effects"><Grid x:Name="LayoutRoot"> <Leadtools_Windows_Controls:BitmapSourceViewer Margin="124,132,205,124" Content="BitmapSourceViewer" ScaleFactor="1" SizeMode="Fit"> <Leadtools_Windows_Controls:BitmapSourceViewer.Source> <BitmapImage UriSource="C:/Program Files/LEAD Technologies/LEADTOOLS 16/Images/ImageProcessingDemo/NaturalFruits.jpg"/></Leadtools_Windows_Controls:BitmapSourceViewer.Source> <Leadtools_Windows_Controls:BitmapSourceViewer.BitmapEffect> <Leadtools_Windows_Media_Effects_SpecialEffects:ColoredBallsCommandBitmapEffect/> </Leadtools_Windows_Controls:BitmapSourceViewer.BitmapEffect> </Leadtools_Windows_Controls:BitmapSourceViewer> </Grid></Window>