How to Animate a WPF Standard MDI Window into Place

by Avatar Bill Henning (Actipro)
Thursday, January 5, 2017 at 1:52pm

PostBannerWPFControlsTipsAndTricks[4]

Our WPF Docking/MDI control product allows you easily add docking tool windows and a MDI (multiple document interface) to your app, one that mimics Visual Studio.  We have two built-in MDI options: tabbed and standard.  Tabbed is similar to the style that current Visual Studio versions use.  However some customers still prefer to use the classic windowed style of MDI that we call "standard MDI".

There is no built-in standard MDI mechanism in WPF, but we provide a complete implementation in Docking/MDI with all the functionality like cascading and tiling that you would expect.

We just had a customer ask how they could animate a standard MDI window into place when it's first loaded. 

We did a quick experiment in our 2016.1 version using a simple implicit Style and it worked great.  Here's the results:

StandardMDIPopIn_thumb[1]

The animation we defined quickly fades in the window and "pops" it into place.  This animation matches the animations we use elsewhere in the product such as when dock guides appear while dragging docking windows around.

Here's the code that you can place in your app's Resources to get the animation above to appear:

<Style TargetType="docking:StandardMdiWindowControl">
<Setter Property="Opacity" Value="0" />
<Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0.8" ScaleY="0.8" />
</Setter.Value>
</Setter>
<Style.Triggers>
<EventTrigger RoutedEvent="docking:StandardMdiWindowControl.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2" />

<DoubleAnimation Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleX)" To="1" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
<DoubleAnimation Storyboard.TargetProperty="RenderTransform.(ScaleTransform.ScaleY)" To="1" Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>

Download our WPF Controls and give it a try!

TaskDownload TaskBuyNow

WPF Controls v2016.1 Maintenance Release

by Avatar Bill Henning (Actipro)
Thursday, December 15, 2016 at 1:15am

BlogPostBanner-WPF16.1.0635

Today we published a WPF Controls maintenance release v2016.1 build 635.  The updates are described in detail in this post.  It is highly recommended that you download this maintenance release since it fixes several issues that popped up with the Docking/MDI product and makes several other minor enhancements as well.

We are now at a stage where we are about to start prepping our codebases for the upcoming 2017.1 version.  Over the past few months, we've been working on an array of new and revised controls for that version, and will begin merging all that in over the coming weeks.  Look for a beta testing request announcement in very early 2017. 

Everyone, please have a wonderful holiday season and happy new year!

TaskDownload TaskBuyNow

WPF, UWP, and Silverlight v2016.1 Maintenance Releases

by Avatar Bill Henning (Actipro) - 2 comments
Friday, November 18, 2016 at 3:33pm

Maintenance16.1.BlogPostBanner

Very large maintenance releases of our v2016.1 WPF, Universal Windows, and Silverlight controls have been released and are now available for download.  While there are an enormous number of minor updates and bug fixes made across the various UI control product range, the following lists the major updates that were made.

Visual Studio 2017 Support

These Actipro maintenance releases update our UI controls to support the Visual Studio 2017 RC version that was released on Wednesday.  Congratulations to the Microsoft teams involved in delivering the next major version of our favorite IDE!

ProductHeadingGenericDocking

A new event has been added that is raised when dragging docking windows over a drop target.  Handle this event to specify that certain dock guides should be hidden that normally would be visible.

DockingDockGuides

A new property is available to prevent floating dock hosts that contain MDI from showing in the Windows taskbar.  (WPF only)

ProductHeadingUWPEditors

A new Calculator control has been added that provides a familiar calculator interface to interactively calculate numeric values.  A new PickerKind property is available on DoubleEditBox and Int32EditBox to allow for optional usage of the calculator in the popup picker.

DoubleEditBoxOpenedCalculator   TimeSpanEditBoxOpened

New edit box and picker controls have been added for the Int16, Int64, Single, and TimeSpan types.

A new property has been added that determines the scenarios (e.g Enter key press, etc.) in which a value commits when editing in an edit box.

A new property has been added that determines the wrapping behavior used when spinning past a minimum or maximum value in the active part in an edit box.

Added the DoubleEditBox.IsNaNAllowed, IsNegativeInfinityAllowed, and IsPositiveInfinityAllowed properties, which allow entry of those related values.

DoubleEditBoxNaN

Improved Int32EditBox to support hexadecimal formats.

Improved GuidEditBox to support multiple formats.

GuidEditBox

Added UI automation peers for numerous controls.

ProductHeadingWPFEditors

The MaskedTextBox control added a default context menu and the gradient brush editor added a Remove Stop button.

BrushEditBox

ProductHeadingGenericGrids

The TreeListBox control and its derivatives added a powerful data filtering mechanism that uses string, boolean, and predicate-based logic to filter items.

TreeListBoxFiltering

A new sample that demonstrates filtering was also added.

ProductHeadingGenericSyntaxEditor

Added the ZoomLevelIncrement property that controls the mouse wheel zoom step amount.

Added several UI automation peers for internal SyntaxEditor components.

CompletionListCentered

Improved the IntelliPrompt completion list to try and keep the item matched by typing scrolled to the middle.

ProductHeadingGenericShared

Added a UI automation peer for the RadialSlider control.

RadialSlider

Updated the RadialSlider control to support more keyboard shortcuts.

Summary

All products received numerous other minor enhancements and bug fixes.  See the announcement posts for the detailed list of enhancements and updates:

TaskDownload TaskBuyNow

Grayscale Disabled Images in WPF

by Avatar Bill Henning (Actipro)
Wednesday, August 31, 2016 at 1:25pm

PostBannerWPFControlsDevNotes

The most recent 2016.1 release of our WPF Controls added a new DynamicImage control.  This is a drop-in replacement for Image that will auto-grayscale the image content when the control is disabled.

Grayscale Images in Disabled Ribbon Buttons

Ribbon buttons have all been updated to automatically grayscale their images when they are disabled.

RibbonDisabledButtons

The left ribbon has enabled buttons and the right ribbon has several disabled buttons

Grayscale Images in Disabled ToolBar Buttons

ToolBar buttons (if our native control themes are applied) have also all been updated to automatically grayscale their images when they are disabled.

ToolBarDisabledButtons

The left toolbar has enabled buttons and the right toolbar has several disabled buttons

Summary

In the past, the above disabled buttons would show their images with some transparency but would retain the color.  Having images auto-switch to grayscale ensures that they truly reflect a disabled state.

These features are in the latest 2016.1 maintenance release, available now.

TaskDownload TaskBuyNow

SyntaxEditor Line Modification Mark Enhancements

by Avatar Bill Henning (Actipro) - 4 comments
Thursday, August 25, 2016 at 6:57pm

PostBannerSyntaxEditorDevNotes

The latest maintenance releases of our v2016.1 WPF, Universal Windows, and Silverlight controls had some major work done on SyntaxEditor's line modification marks feature.  In fact, its internal logic was completely rewritten and improved.

Overview

Line modification marks use colored bars in the selection margin to tell the end user whether changes have occurred on the line, and whether those changes have been saved.

This animation shows this feature in action:

SyntaxEditorLineModificationMarks

New changes will turn the marks yellow to reflect that those lines are “dirty” (unsaved).  If you then "save" the document (which I do above after typing on two lines), the marks turn green to indicate they are now saved.

While the yellow and green marks were present in older versions, there were some bugs that could occur with their tracking over the course of multiple text changes.  Those bugs have been fixed in this latest maintenance release.

In addition we also have added orange marks, that occur when you undo past the save point.  They show anything that is different from what was saved but is not different from the document when it was originally opened.

Summary

These great new features match exactly with what is in Visual Studio and are wonderful for end users.  Grab the latest 2016.1 builds to add them to your own apps!

TaskDownload TaskBuyNow