The Actipro Blog

All the latest UI control development news from Actipro

First Look: Docking and SyntaxEditor for WPF

A week or so ago in our newsletter we officially announced the development of Actipro Docking for WPF and Actipro SyntaxEditor for WPF.  These two products when completed will be added to our WPF Studio control bundle.

Also note that we have some other special controls in development as well, but we'll keep those under wraps for now. 

Docking

A WPF window showing tool windows that are docked and in auto-hide mode, along with a SyntaxEditor control in the content area of the DockSite

Actipro Docking for WPF

The Docking product is progressing very nicely and is expected to be the next major product added to WPF Studio.  Its design harnesses our themes framework, thereby making it easy for us to provide alternate themes such as Aero, or Office themes with minimal effort.

Docking includes many of the extremely flexible behavior options that have made our UIStudio Dock for Windows Forms product very popular.  We also have some surprises in store.  We'll get into some of these options and new features in future posts.

Actipro SyntaxEditor for WPF

We're approaching the SyntaxEditor product as an opportunity to do a lot of neat new things and make improvements to the SyntaxEditor for Windows Forms product that is recognized as the industry leader in syntax highlighting editor controls.

One design goal of ours is to try and separate out the document/parsing model to a .NET 2.0-based assembly that could be used by both SyntaxEditor for WPF, SyntaxEditor 5.0 for Windows Forms, and a future CodeHighlighter.

We are working on doing some big language design enhancements too.  Even though what we have now is great, we have a lot more ideas that we want to integrate, making it easier for you to develop both simple and complex language parsers for your editor.

More Sneak Peek Posts

Stay tuned to the blog for more information on Docking, SyntaxEditor and other new controls.  We'll continue to post new information as development progresses.

Filed under: Actipro, In development, WPF, XAML

SyntaxEditor .NET Languages Add-on Adds Generic Type IntelliPrompt

The latest build for SyntaxEditor's .NET Languages Add-on now includes complete generic type IntelliPrompt functionality.

DotNetAddOnGenericTypeMembe

A parameter info tip displayed for a generic type... notice how it has resolved the return type to String

This has been a highly requested feature by customers.  Now you can fully utilize the power of generic types such as generic collections, etc. with the .NET Languages add-on.

For instance, in the screenshot above, after you would complete the indexer reference and press ".", the member list that would display would be for type String.  Type String was declared as the "U" generic parameter in MyCollection, which was passed down to the base Collection generic type.  Therefore the String type was used to construct Collection.  With the most recent build, SyntaxEditor's .NET Languages Add-on can recognize that and provide proper IntelliPrompt related to it.

Enjoy the new features!

Where did my Ribbon go? Ribbon hides at run-time after designing with VS 2008

This is an issue that a couple customers have run into and emailed us on, so we wanted to post more about it. 

Scenario

The scenario is that you drag a Ribbon onto a Window and everything shows up fine at design-time.    But when you go to run your application, you see a blank Window.

Why Did It Disappear?

What happened was that you probably clicked and dragged something somewhere in the Visual Studio designer that either:

  • Set the Width or Height of the Ribbon to an explicit size (very bad)
  • Set the Margin around the Ribbon to something that forces it to have a smaller than desired size
  • Did the above things to a direct container of Ribbon that affects its size

At run-time a feature of Ribbon is to collapses when there is not enough space for it.  You have full control over the threshold size at which this collapse occurs.  But one of the items in the list above would have caused this collapse code to kick in because the Ribbon is being forced smaller than desired.

Resolution

To fix this problem, simply look at the XAML for your Ribbon tag and remove any Width/Height property settings.  Also check to ensure that a Margin isn't set that could be causing this.  Then run your application and everything should appear like you would expect since now the Ribbon is not being forced to a small size.

Why Does It Show at Design-Time?

In the designer we force Ribbon to stay expanded and ignore its normal run-time collapse behavior.  This is done so that you can properly visually design the Ribbon.

Further Reading

We also have a section explaining this issue in the Ribbon control's Troubleshooting topic in the product documentation.

New Ribbon Feature - Hiding the Application Button

The latest WPF Studio v3.5.0421 build includes an interesting new feature for Ribbon that was requested by several customers, the ability to hide the application button.

ApplicationButtonHidden

A ribbon with its application button hidden

This new feature can be activated with a simple Ribbon.IsApplicationButtonVisible property change.

When the application button is hidden, the QAT and tabs slide over to fill the space.

Tags: ,
Filed under: Actipro, WPF, New features, XAML

ExplorerBar for WPF - Windows XP-like task pane

Explorer bar is an implementation of the task bar that was introduced in Windows XP's explorer. It hosts a vertical stack of expandable panes that generally provide task-based information to the end user.

ExplorerBarThemeLunaNormalColor

The ExplorerBar control in its Luna normal-color theme

Any content can be placed within each expander pane and the alternate style of pane headers is supported via a simple style setting.

Animated Expander Panes

Each expander pane uses smooth animation to fade in and slide down its contents when expanded. Likewise, when an expander pane is collapsed, its contents fade out and slide back up.

ExplorerBarAnimation

The ExplorerBar control with its second pane being expanded with animated fade in and slide down

Themes

This product includes 4 distinct built-in themes and is fully extensible so that other product themes can be custom developed. Themes can be tinted towards any color or set of colors, and brush resources from them may be reused.

ExplorerBarThemeClassic

The ExplorerBar control in its Windows Classic theme

Single Expansion Option

An option is available to only permit a single expander pane to be expanded at any time. By default, any number of expander panes may be expanded.

Globalization

This control fully supports left-to-right layouts and user interface resource string customization.

ExplorerBarFlowDirection  
ExplorerBar using a right-to-left flow direction

Designer Support

ExplorerBar has designer support similar to our other controls.  For instance when working in Visual Studio 2008, you have access to task panes for the controls:

VSExplorerBarTaskPane

An ExplorerBar selected in the Visual Studio 2008 designer

ExplorerBar installs toolbox items for VS 2008.  It even includes an item template that is available from the New Item pane in VS 2008 that when selected, creates a new Window with a simple ExplorerBar on it.

Getting ExplorerBar Free

Any Actipro WPF Studio customer with an active subscription is eligible to get ExplorerBar for free!

Filed under: Actipro, WPF, XAML, New product

NavigationBar for WPF - Complete Outlook 2007 Functionality

Actipro WPF Studio v3.5 adds a new control called NavigationBar.  NavigationBar provides a facility for navigating through different panes of data. This concept was introduced in Outlook, and NavigationBar implements all of the features found in Office 2007. It has an elegant user interface which uses buttons to control which navigation pane is selected. Panes can display data or simply act as a container for child controls.

NavigationBarThemeOffice2007Blue
The NavigationBar control in its Office 2007 blue theme

If screen real estate is available, large buttons can be used for pane selection. The end-user has the option of using a splitter to move the large buttons into the overflow button tray, which uses smaller buttons. If not all of the buttons can fit in that tray, they flow out into the overflow menu, accessible by the chevron button.

NavigationBar Minimization

The NavigationBar supports a minimized mode in which it is collapsed to be very narrow. A button appears in the original content area of the NavigationBar and when clicked, a popup displays containing the content of the currently-selected pane. Minimization can be set to occur on the left or right sides.

NavigationBarMinimizedPopup

A minimized NavigationBar control with its content popup displayed

Customize Button

The customize button can optionally be displayed in the overflow button area of the NavigationBar. When clicked, it displays a menu that is populated with default menu items but can be customized and fully styled

Options Window

A built-in Options window comes packaged with NavigationBar.

NavigationBarOptionsWindow

A minimized NavigationBar control with its content popup displayed

The window offers the end-user the ability to reorder navigation pane buttons by using the Move Up and Move Down buttons. Navigation pane buttons can also be hidden by unchecking the button items in the list. The visibility and sort order can be reset back to defaults by clicking the Reset button.

Themes

This product includes 8 distinct built-in themes and is fully extensible so that other product themes can be custom developed. Themes can be tinted towards any color or set of colors, and brush resources from them may be reused.

NavigationBarThemeLunaHomestead NavigationBarThemeCustomRed

The built-in Luna Homestead theme and a custom-tinted theme

Containers

The NavigationBar has an option to hide its pane buttons. By using this option, you can mimic a simple container that has the NavigationBar appearance.

NavigationBarContainer
A NavigationBar control in the Luna normal-color theme containing a single pane, and with pane buttons hidden

NavigationBar also includes styles that can be used for Expander controls to mimic a sub-header panel. The expander uses fade and slide animation during expand and collapse operations.

NavigationBarStandaloneExpander

A native WPF Expander with the Luna normal-color theme's expander style applied

Layout Serialization

End user layout customizations can be persisted in XML format and restored later.

Globalization

This control fully supports left-to-right layouts and user interface resource string customization.

Designer Support

NavigationBar has designer support similar to our other controls.  For instance when working in Visual Studio 2008, you have access to task panes for the controls:

VSNavigationPaneTaskPane

A NavigationPane selected in the Visual Studio 2008 designer

NavigationBar installs toolbox items for VS 2008.  It even includes an item template that is available from the New Item pane in VS 2008 that when selected, creates a new Window with a simple NavigationBar on it.

Getting NavigationBar Free

Any Actipro WPF Studio customer with an active subscription is eligible to get NavigationBar for free!

Filed under: Actipro, WPF, XAML, New product

It's all about frameworks... updates coming to the WPF Shared Library

We're currently ramping up for the Actipro WPF Studio v3.5 release, and I wanted to discuss some of the new framework features that we've built into the Shared Library for this release.

As a side note, we have an exciting new WPF product that will be part of v3.5 and all WPF Studio customers will get it for free upon release.  But more on that in a later blog post.

Themes Management Framework

As we started adding more controls to WPF Studio that have numerous themes, we recognized the fact that we really need to have a common themes framework that supports both the native WPF system theme switching capabilities, along with an optional easy way to change the entire theme of an application with a single line of code.

Take Office for example... they offer three built-in themes: blue, silver, and black.  Our goal with the design of our theme framework was to be able to say in one line of code, change all Actipro controls (and any other controls that use this framework) to look right under a user-specified theme.

That's right, the framework is fully extensible so that when you use WPF Studio with your WPF applications, and you've defined your own custom controls, you'll be able to wire up multiple themes of your own custom control to our theme manager and have the theme automatically change when you set the application's theme.

Changing Themes

Changing a theme is as simple as a line of code like this:

ThemeManager.CurrentTheme = "Office2007Blue";

That line of code will automatically change any control's theme that is registered with ThemeManager to use resources for the specified theme name.

ThemeManager also defines an attached Theme property that can be set on any control.  So say you only want to change themes on a particular UserControl and make any of its contents use a Windows XP Blue theme, simply set the ThemeManager.ThemeProperty value on the UserControl to "LunaNormalColor" and voila, the child controls update.

How Does it Work?

Everything in the themes framework is built upon the base resource dictionary design in WPF.  Essentially ThemeManager maintains a catalog of what resource dictionaries provide what themes for what controls.  When you change a theme, it unloads any previously-loaded dictionaries and loads any appropriate new ones.

As mentioned, Actipro controls that support multiple themes will have this functionality built-in, but you can also register themes for your own controls and have them change themes right along side of Actipro's controls for a consistent user interface.

Tinting All or Part of a Theme

Our theme framework also supports the tinting of any theme or portion of a theme towards a certain color.  This means that you can take a built-in theme like the Office 2007 silver theme, and make it a red one instead.  Various groups of brushes and pens can be defined as belonging to tint groups, allowing you to change certain portions of a theme's resources to different colors. 

Object Serialization Framework

A new object serialization framework will appear in v3.5.

XAML Serializer

A class named XamlSerializer provides numerous methods for saving any object to XAML with one line of code and reloading the object later, again with a single line of code.  You can persist to a string, Stream, file, or XmlWriter.

XML Object Hierarchy Serializer

We also started encountering a pattern where hierarchies of objects need to be persisted to XML.  This is most commonly used when persisting end user layout changes for controls (like docking window layouts, etc.).

Therefore we came up with a framework for easily building serializable object hierarchies that harnesses the .NET XmlSerializer at its core but provides a wrapper around that functionality with many useful features.

For instance, the framework also can serialize to a string, Stream, file, or XmlWriter with one line of code.

An added benefit of the framework is that you can provide a delegate that is called whenever an object in the object hierarchy is serialized.  This allows you to insert custom data into the serialized data at any location.  Likewise, you can read this data back in by providing another delegate at load time.

We envision this framework being used in many future WPF products.

String Resources Framework

Finally, we came up with a good way of storing and accessing string resources for our products.  Any string that is displayed in the user interface for our controls will now be located in normal .NET string resources.

We provide an SR (string resource) class in each product that has string resources, which can retrieve a named string resource programmatically.  And we include an SRName enumeration containing the names of all string resources in the product.

On top of that, the SR class has a number of methods for completely customizing the string resources by changing specific string resource values to custom strings.  This will be most commonly used for localization.

The SR class returns the resolved string resource value between the customizations and the defaults.

To make things even better we also have make a markup extension that can be used in XAML.  Simply call the markup extension and pass it the name of the string resource to retrieve.  Its return value will be the resolved value of the string resource.  We now use this throughout our control templates.

Summary

These are just some of the new features you'll find in WPF Studio v3.5 when it is released soon.

Filed under: Actipro, WPF, New features, XAML

Ribbon for WPF Adds Mini-Toolbar - Now Implements 100% of Microsoft Spec

Great news, the latest version of Actipro Ribbon for WPF now has full mini-toolbar functionality.  With this addition, Actipro Ribbon now implements 100% of all required and optional Microsoft Ribbon UI specifications.  We're very proud because we are the first company to achieve 100% implementation of the specs in a WPF ribbon.

Mini-Toolbar

The mini-toolbar is a great new concept introduced in Office 2007. Any controls, including galleries, can be used on the mini-toolbar.

MiniToolBar

A mini-toolbar showing the use of a color picker gallery child control

Mini-toolbars are typically used in two scenarios: following a mouse selection in a document and for display along with a context menu to provide additional options.

Showing a Mini-ToolBar After a Mouse Selection

When a selection is made in a document, a mini-toolbar can be made to semi-transparently appear above the mouse. As the end user moves the mouse closer to the mini-toolbar, it becomes more opaque. Moving the mouse farther away makes the mini-toolbar more transparent until a point where the mini-toolbar disappears completely. After a certain threshold distance is passed, the mini-toolbar is closed completely and does not reappear until another selection is made.

MiniToolBarTransparency

A mini-toolbar displayed after a selection showing how it changes from semi-transparent to opaque when the mouse moves over it

Configuring a Mini-ToolBar for Pairing With a Context Menu

A mini-toolbar can optionally be paired and displayed with any ContextMenu. Normally the mini-toolbar appears above the context menu. If a menu item on the context menu is chosen, both the context menu and mini-toolbar close. Alternatively, if the end user clicks a control on the mini-toolbar, the mini-toolbar remains open but the context menu closes. After this point the mini-toolbar behaves as if it was opened standalone.

MiniToolBarWithContextMenu

A mini-toolbar displayed with a context menu

Filed under: Actipro, WPF, New features, XAML

Welcome to the Actipro Blog!

Welcome to the Actipro Blog, the place where we will be posting insider information on anything related to Actipro Software products including upcoming products, features, tips and tricks, etc.  We also will be posting general WPF and Windows Forms news that is useful for the masses.

Stay tuned for some big updates coming soon!

Tags:
Filed under: General, Actipro