Tweets by @Actipro
Please take some time to learn more about us and our product offerings.
In our latest maintenance release of WPF Studio's Shared Library v3.5.0427, we have added a simple decorator class called PixelSnapper.
The PixelSnapper decorator basically snaps the measurement of its child content to integer values, thereby helping to prevent blurry images and borders that may appear after it.
A problem in WPF is that images and borders can become very blurry when they are positioned on non-pixel boundaries. This makes the application appear to be poorly designed to end users even though technically, the developer did nothing wrong.
How does this scenario occur? Very easily in fact. Say you have a standard WPF Menu at the top of your Window. The text in the menu items may measure to 12.5 pixels high. Then lets assume that we have 2 pixels of padding. Now we have a Menu that is 16.5 pixels high and the problem has been introduced.
The control directly under the Menu will start at vertical location 16.5. If this control is an Image, all the pixels in the image will appear blurry in the vertical direction since each lies half on one pixel and half on the one below it. Even setting SnapsToDevicePixels to true does nothing to correct the issue.
In the screenshot below, we have a Border with a PixelSnapper surrounding it. In the left sample, the PixelSnapper has snapped its contents to integers, the default behavior. In the right sample, the PixelSnapper functionality has been disabled.
A demonstration of the differences between using and not using PixelSnapper
Note how the images, which are laid out after the Border, are blurry when not using PixelSnapper functionality due to the decimal size of the Border.
Where should you use PixelSnapper? Generally, text elements like TextBlock controls are the only ones that will measure to decimal values. So any time you have a text control in your UI and that control will affect the layout of other controls, we recommend you surround it with a PixelSnapper in your XAML. This will keep everything in your UI on pixel boundaries, enabling images and lines to remain crisp and clear.
PixelSnapper includes options for controlling how the separate horizontal and vertical measurements are rounded. Options for each include None, Floor, Ceiling, and Round.
This is the second sneak peek for the forthcoming Docking for WPF product that will be added to WPF Studio upon completion.
The runtime functionality is progressing very well. We have been getting questions from customers as to the XBAP capabilities of the docking windows. There's no better to relate these than to show a live screenshot.
The docking functionality in an XBAP, even with support for floating windows
The screenshot above shows Docking for WPF being hosted in an XBAP browser application. To create the screenshot we started with a default layout that was created in XAML and then at run-time, dragged the Solution Explorer tab to a floating location.
Docking for WPF uses a custom control class that mimics Window controls but can be used in contexts like XBAPs. It supports all the main functionality found in Window such as resizing, etc. By using this control, we can support floating tool windows in XBAP applications. They even have nice outer drop shadows to give them some depth.
Look for more posts on Docking for WPF development coming soon!
As mentioned in a previous blog post, we're putting a lot of development time into a new product named Docking for WPF. This product will provide advanced docking window and MDI management functionality for WPF applications, similar to that of our UIStudio product for Windows Forms.
We also have several other major new WPF products in the works but are keeping quiet on those for the time being.
Without further ado, here is a current screenshot of the Docking product:
The Docking for WPF product showing complex hierarchies of docked tool windows, auto-hide, tabbed MDI, and dock guides
Much of the functionality you see above is working great. We need to do a lot of object model refinements yet and have to get into some other new features but everything is progressing nicely.
Docking for WPF is not yet available, however customers of our WPF products may be eligible to participate in a beta test once we get closer to that phase of development. If you are a WPF Studio customer and would like to help beta test the product later on in the development cycle, send us an e-mail.
We get a lot of questions on whether the Docking for WPF product will be included in WPF Studio upon release. The answer is yes.
Any customer who has an active WPF Studio subscription at the time of Docking for WPF's release will get it for free!
If you would like to request any specific features for the Docking for WPF product, now is the time to send your comments in. Just email our support address at any time.
Today's WPF Studio maintenance release added a new Aero theme for the ExplorerBar control.
The ExplorerBar control in its new Aero theme
The screenshot above shows the normal and alternate styles for ExplorerBar items. In addition, when the mouse moves over a header, the header changes its background to reflect the hover state.
We've done a lot of blogging in the past couple of weeks on new WPF controls that were being prepared for the next maintenance release of WPF Studio v3.5. Well, I'm pleased to announce that all those controls are now live with today's latest build 425.
A slew of new controls and components are included in this build. Here is a brief list of the major new ones, with links to the previous blog posts that describe them:
Our already-thorough documentation has been further enhanced, with a lot of new topics.
We've continued to add many new samples to the Sample Browser with this build. In fact, there are 16 new samples added in this maintenance release!
If you already own WPF Studio v3.5, just go to your Organization Purchases page and download the new maintenance release from there. If you don't own WPF Studio v3.5, you can get it from the Download page.
The last major control that will be added to our Navigation for WPF product in the upcoming WPF Studio v3.5 maintenance release is the Actipro Breadcrumb control. The Breadcrumb concept was introduced in Windows Vista to replace the old style of address bar.
The Breadcrumb control
The Breadcrumb control is essentially a condensed version of a TreeView. Instead of showing a full hierarchy, only the selected path down the tree is displayed. We've put a lot of work into this control to make sure it has all the Windows Vista features along with some additional ones.
When the drop-down arrow next to an item is clicked, a popup menu displays containing the child nodes. Simply click on a child node to select it.
When the width of the Breadcrumb is not large enough to support the display of all the items, a chevron button appears at the left side of the Breadcrumb. Clicking the button shows a menu containing access to all the hidden parent nodes.
The Breadcrumb with an overflow menu displayed... the top portion is the stack of overflowed items, and the bottom portion is the list of items for the root minimized Desktop node
Breadcrumb can be configured to auto-hide any number of nodes at the top of the hierarchy when child nodes are selected. This behavior defaults to hiding only the root node. For example, in a file system when you select something below the Desktop, the Desktop node minimizes but is fully accessible from a drop-down button that is displayed in its place. This allows you to hide nodes that aren't commonly used but still keep them accessible.
Tail items are a really neat feature that is unique to Actipro Breadcrumb. Not even Vista's Breadcrumb has it. By default, the last item displayed is the selected item. However you can configure the Breadcrumb to display any number of tail items.
The Breadcrumb showing a progressive fade feature for tail items
As an example, say you drill down to a leaf node in your tree. Then you click a parent node item to select the parent. If tail items are enabled, the previously-selected leaf node will still be visible although with a faded appearance. This allows end users to quickly jump back to a previously-selected child node.
By clicking on the icon at the left of the Breadcrumb, you can jump into "edit" mode. In this mode, the node items disappear and are replaced by a TextBox where you can enter the full path to the desired node directly.
The Breadcrumb showing an active edit mode
You have total control over how the text path is converted to a node path.
Custom action buttons may be added to the right side of the control. These can be anything you wish, however for proper usage you will want to have their purpose be related to the nodes represented in the Breadcrumb.
Just like Vista's Breadcrumb, Actipro's BreadCrumb fully supports a progress bar embedded in the background of the control. You can optionally use this to reflect loading progress when a new node is selected. It uses our AnimatedProgressBar control that was described in a previous blog post.
The Breadcrumb showing a progress bar in its background, indicating to the end user that an operation is in progress
Features include animated smooth progress transitions, multiple states (green, yellow, red), and more.
Breadcrumb supports multiple built-in themes, everything from Windows Classic to Vista.
We are currently working on the samples and documentation for Breadcrumb, and expect to have it released in the next several days.
The latest build 274 of SyntaxEditor's .NET Language Add-on includes several improvements for generic method support.
First, if you call a generic method (defined as T GenMethod<T>()) passing the generic parameter type like (GenMethod<int>().), the member list that is displayed will be for int.
Demonstrates how the generic extension method ElementAt is applied to a string array twice and SyntaxEditor correctly recognizes the final return value is a char
Second, generic methods on extension methods now resolve types properly as well. This is especially useful with Linq as you can see in the screenshot above. Above, ElementAt is a generic extension method defined on Linq's Enumerable class. The first time it is applied, the string type is returned and the second time it is applied, the char type is returned.
We still have a little more work to do with generic methods but these are some great steps forward!
Another smaller new control that is ready for the upcoming WPF Studio v3.5 maintenance release is PopupButton.
A PopupButton with its resizable popup displayed
PopupButton allows you to easily define a button that can display a popup. The popup can show any WPF content or can optionally display a ContextMenu. The popup content and context menus can be defined in XAML or dynamically in code.
There are several display modes for the button. It can show a split mode where the button is clickable separately from the popup portion. The split can be removed so that the entire button displays the popup when clicked. In this mode, you also have an option of hiding the content area and just showing an arrow indicator. The other option is the turn off the popup portion and make it behave like a normal button.
Another great option is the ability to have the button render "flat" until the mouse moves over it, at which point the background and borders appear.
Numerous themes are included with the control.
In our next "first look" post, we will talk about a major new control for the maintenance release that uses PopupButton.
We're getting very close to having the next big maintenance release for WPF Studio v3.5 ready. One of the larger new controls that is part of Wizard is the new AeroWizard control. AeroWizard inherits our normal Wizard control but provides a custom UI that mimics the style of wizards found in Windows Vista.
An AeroWizard control that shows how easy it is to create Vista-like wizards
Note that all of the glass rendering and title bar area is handled for you. We have a special AeroWizardWindow class that is a Window intended to contain an AeroWizard. You can interact with the expanded title bar region just like you would in the true non-client title bar area of the window, meaning double-click to toggle maximization, click and drag to move the window, right click to display the system menu, etc.
In Aero wizards, the Back button appears in the title bar to keep consistency with the other Vista explorer windows and task dialogs.
Since AeroWizard inherits Wizard, it supports all the many features you've come to love in the core Wizard product, including command-base page switching, animated page transitions, and much more.
Want to get started building Aero wizards fast? The new build will include a VS 2008 item template that gets you going in seconds with a fully-functional Aero wizard template window.
No Aero wizard is complete without the special buttons called command buttons that sometimes allow for choices within the main page area. We've fully implemented command buttons for you, and they even have the smooth animation when you move the mouse over them or click on them.
We're very excited to offer Aero wizards in WPF Studio with the upcoming release.
We had a customer write us the other day mentioning that ClearType was turning off when using our RibbonWindow class in Windows Vista with Aero enabled and was falling back to grayscale antialiasing.
After a lot of debugging and searching, we found that the root of the problem was the use of Vista's Aero glass in the client area of a Window in WPF. Basically if glass is disabled or not available (like in Windows XP), everything is fine and renders properly using ClearType. However if you implement your WPF Window such that glass can enter the client area (like in our RibbonWindow or previously-posted GlassWindow that is soon to be released), ClearType will disable and grayscale antialiasing will be used instead.
We traced the line that causes the issue down to this one, which is necessary for any WPF Window to properly support Aero glass in its client area:
// Ensure the background of the composition target is transparent HwndSource.FromHwnd(hwnd).CompositionTarget.BackgroundColor = Colors.Transparent;
Basically if the Colors.Transparent is set to the Window's composition target, ClearType becomes disabled. If you don't set this however, then glass is not able to enter the client area of the Window.
Here is a great post by Dax Pandhi on how to enable Aero glass in WPF Windows.
In there you can see how the line of code above is used to notify Win32 to use a transparent background for the client area of the window.
After some more searching on Google, we found this post too which explains the issue a bit more:
Give me back my ClearType
That post shows some screenshots of the issue and is very helpful for telling what things will cause ClearType to disable.
I've posted a question about this issue in the Microsoft WPF forum and hopefully Microsoft will do something about this in the future.