The past few releases were mostly dedicated to refactoring and ImageFrame. CompositionProToolkit v0.4.5 continues the tradition and brings in new additions to code and a few new features to the ImageFrame control.
Well, this task was pending for a long time! CompositionExpressionToolkit code now has been merged into CompositionProToolkit under the CompositionProToolkit.Expressions namespace. If you have not used the CompositionExpressionToolkit project before you can find out more more details about CompositionProToolkit.Expressions here.
In this release, ImageFrame has got a few feature modifications and additions.
The Source property of ImageFrame is of now of type object and it can accept the following types
- String (from which a Uri can be successfully created)
Image caching is permanently enabled now. ImageFrame will internally cache the objects provided to Source property. The cache is located in the temporary folder of the application using the ImageFrame.
As a result, the following property has been deprecated and removed from ImageFrame
You can clear the cache anytime you want by using the following code
ImageFrame provides several transition animations while displaying the newly loaded image. You can configure which animation to run by setting the TransitionMode property of the imageFrame.
|Dependency Property||Type||Description||Default Value|
||Indicates the type of transition animation to employ for displaying an image after it has been loaded.||TransitionModeType.FadeIn|
TransitionMode property can be set to any of the following values defined in the TransitionModeType enumeration
FadeIn– The newly loaded image fades into view.
SlideLeft– The newly loaded image slides into view from the right side of the ImageFrame and moves left.
SlideRight– The newly loaded image slides into view from the left side of the ImageFrame and moves right.
SlideUp– The newly loaded image slides into view from the bottom of the ImageFrame and moves up.
SlideDown– The newly loaded image slides into view from the top of the ImageFrame and moves down.
ZoomIn– The newly loaded image zooms into view from the center of the ImageFrame.
The ShowPlaceholder property is now set to True by default.