How can I use a BulletDecorator control that uses an image as the Bullet and a non-text element as the Child ?

The following example shows how to define a BulletDecorator control that uses an ’image’ as the Bullet and a ’non-text element’ as the Child. In this example, the Bullet object centers itself next to the non-text element. [XAML] <BulletDecorator Grid.Row=’3′ Grid.Column=’0′ Margin=’0,5,0,0′> <BulletDecorator.Bullet> <Image Source=’images\apple.jpg’/> </BulletDecorator.Bullet> <Ellipse Height=’75’ Width=’50’ Fill=’Purple’ HorizontalAlignment=’Left’ ></Ellipse> </BulletDecorator>

Can I host WPF objects in WIN32 application ?

Yes. VisualObjects of WPF application can be hosted in WIN32 application using the “HwndSource” class. The HwndSource class wraps the objects in the WPF application and allow them to be incorporated in the WIN32 application as a child window.

How HitTest methods in VisualTreeHelper is useful ?

HitTest methods are used to determine whether a point or geometry value is within the content of a rendered object like a control or graphic element. Using the ’HitTest’ methods you can determine whether the mouse was clicked within a control and also by overriding the implementation, custom actions can be performed.

How do I apply Transform when an event is occurred ?

Any type of transform can be applied when an event has occurred. The following lines of code apply a ’RotateTransform’ when the mouse is moved over the image. [XAML] <Image Source=’pda.ico’ MouseEnter=’Image_MouseEnter’ MouseLeave=’Image_MouseLeave’> <Image.RenderTransform> <RotateTransform Angle=’0′ x:Name=’ImageRot’/> </Image.RenderTransform> </Image> [C#] private void Image_MouseEnter(object sender, MouseEventArgs e) { ImageRot.Angle = 30; } private void Image_MouseLeave(object sender, MouseEventArgs e) { ImageRot.Angle = 0; }

How do I apply an animation without using a storyboard ?

Animations can be applied without using the StoryBoard. BeginAnimation() method can be used to apply animations instead of StoryBoard. This method can be used when simple animations are applied to a property of a control. The following code snippet animates the width of the TextBlock using the ’BeginAnimation’ method. [C#] DoubleAnimation Dblanimation = new DoubleAnimation(); Dblanimation.From = 25; Dblanimation.To = 50; Dblanimation.Duration = new Duration(TimeSpan.FromSeconds(3)); tb.BeginAnimation(TextBlock.WidthProperty, Dblanimation);