Subscribe (RSS)

Quick Links

About Actipro

Actipro Software has been creating .NET user interface control products for Windows Forms since its inception. More recently, Actipro has become a pioneer in the .NET 3.0 WPF control development arena.

Next SyntaxEditor for WPF build gets mouse hover and IntelliPrompt quick info providers

by Bill Henning (Actipro) September 10, 2009 at 02:43

One highly requested feature for SyntaxEditor for WPF is the ability to be notified when a mouse hover occurs so that IntelliPrompt quick info tips can be displayed in response.  Since WPF doesn’t include a mouse hover event, we implemented one ourselves that fires for editor views.

We didn’t stop there though.  We wanted to make it simple for a language to provide quick info popups in response to mouse hover events.  Thus we came up with the new IQuickInfoProvider service.  This service can be registered with a language.  It has three methods on it:

   1: object GetContext(IHitTestResult hitTestResult);
   2: object GetContext(IEditorView view, int offset);
   3: void RequestSession(IEditorView view, object context, bool canTrackMouse);

We offer a QuickInfoProviderBase abstract class that should be used as a base class for any implementations of IQuickInfoProvider that you create.  QuickInfoProviderBase fully implements mouse tracking such that when a mouse hover occurs over an editor view, it calls the GetContext overload that accepts an IHitTestResult.  The IHitTestResult comes from our previously-discussed hit testing feature.  The default implementation of this overload is to call the other GetContext overload if the hit is over a character in the text area.

The GetContext methods should return some object that gives detail about what is at the specified hit or offset, or a null reference if it is not important.  This could be some object as simple as an IToken or some more complex context object.  The important part is that it supports value equality (Equals method implementation) since as the mouse moves, the context returned by GetContext is compared against the context of any already-open quick info session to see if the existing session should be closed or kept open. 

By using GetContext, the quick info provider knows when the mouse moves outside of the the region that is appropriate to an already-open quick info session, and when to open a new quick info session.  Once a new quick info session is needed, the RequestSession method is called.  It is passed the editor view instance, the context object returned by GetContext, and whether the mouse should be tracked (false when quick info is displayed in response to a toolbar button click for example).

Your RequestSession implementations are expected to create a new quick info session, store the passed context in the session, generate content for the quick info popup, and open the session (display the popup).

By using this new provider mechanism, it’s very easy for languages to automatically support quick info display with a minimal amount of work.  All the mouse handling is done for you.  This feature will be in the next build and we’ve updated our quick info sample to show how easy it is to use.

WPF Studio 2009.1 customers can now download default control styles

by Bill Henning (Actipro) June 18, 2009 at 05:57

We’ve just enhanced our Organization Purchases page so that customers of our WPF Studio 2009.1 suite can download a ZIP containing the default styles and templates for the controls.

DownloadStyles

Note the new link highlighted above that you’ll see in your account if you own WPF Studio 2009.1.  Click that link to download a ZIP that has all the XAML source files used in the various WPF Studio products.  These XAML source files define the brushes, templates and other resources that are used by the products.

Enjoy!

A first look at a possible XAML Icons product and browser application

by Bill Henning (Actipro) January 2, 2009 at 18:04

Happy new year everyone.  As mentioned in this previous post, we have been looking into whether customers would like to see us provide XAML icons.  Right now we offer a very high quality raster icons product (Actipro Icons).  This XAML Icons product would be similar however the icons would be DrawingImage-based so that they could easily be used anywhere in WPF that has an ImageSource property.

You’d simply do something like this to use an icon (assuming “Paste32” is a key for one of our DrawingImages that has been exported into your application):

<Image Width=”32” Height=”32” Scale=”Uniform” Source=”{StaticResource Paste32}” />

The Actipro XAML Icon Browser

Without further ado, I’d like to present the icon browser application we’ve put together to view the icons and export them for usage.

Xaml256

The Icon Browser showing a variation of the sample Paste icon that is designed to look best around 256x256 size

The browser is really easy to use.  On the left you select the Target Size.  There are 7 size options, meaning we’ve designed 7 variations of each icon, where each variation is meant to be used at or close to the selected target size.  Target sizes range from 16x16 up through 256x256.

When a target size is selected all the available icons in that size are displayed in the list on the right.  Please note that the sampler only contains the 7 Paste icon variations.  More icons will be included in the Sampler if we do decide to pursue this product.

You can use sliders to scale and rotate the icons.  This really shows off how good they continue to look, even when animation effects have been applied.

Xaml32

The Paste icon designed to look best around 32x32 size, scaled up to 400% size and rotated 17 degrees

When you are ready to export icons for usage in your application, just select the icons to export in the list.  Then click the Export Selected button.  This exports them all to a file that you designate.  The file contains a ResourceDictionary so you simply add it to your own application, merge in the ResourceDictionary with your Application.Resources and you are good to go.

From that point on you reference the icons by their key name, using StaticResource as mentioned above.

Download the Sampler and send us your comments

We’d appreciate it if you could download the free sampler and let us know what you think, both about the icon quality as well as the Icon Browser application.  Please post comments here or email them over.

Download the beta version of the Sampler now

 

Thanks for your assistance!  Whether we pursue this product or not will be based on your feedback.

New PropertyGrid features and other WPF Studio build 471 updates

by Bill Henning (Actipro) October 3, 2008 at 01:53

The latest maintenance release of Actipro WPF Studio v4.5.0471 includes several large updates to the PropertyGrid product, several small updates to other WPF Studio products, and a number of brand new QuickStarts for the Sample Browser.

PropertyGrid Features

Filters

The first new PropertyGrid feature is the ability to quickly and easily filter the items presented. We've included several built-in filters for string and boolean properties, as well as filter groups. String filters support everything from Equals to regular expressions and groups can be used to combine any number of filters using AND/OR logic.

PropertyGridBeforeFilter PropertyGridAfterFilter

Shows the PropertyGrid before (left) and after (right) text is typed to filter out properties by name

We designed the filters so that they can readily be used directly from XAML, including support for data binding. Custom filters can be used when the built-in filters are not enough. 

Filters allow users to quickly find a specific item, or they can be used to permanently exclude items from being displayed. 

A common use of filters is to provide a TextBox above the property grid.  When the end user types in text, only the properties whose names contain the text are displayed.  This is displayed in the screenshot above.

Read-Only State

We have also added a read-only state to the PropertyGrid, which is configured using the new IsReadOnly property. Using this new property, all the value editors in the PropertyGrid can be set to prevent changes.

PropertyGridReadOnly

PropertyGrid with the global IsReadOnly flag set to true; note all values are disabled in this mode

Memory Usage and Other Fixes

Several memory issues and other fixes found since the initial product release are also included in this release.

New Demos and QuickStarts

We've added five completely new demos and QuickStarts to this release, along with updating two of our existing QuickStarts with new functionality.

Docking & MDI Custom Docking Windows

We've had several requests to allow our DocumentWindow and ToolWindow controls to be inherited so that they can be defined as their own classes with separate XAML.  There was a core WPF issue that prevented this in the past (styles wouldn't be applied to the inherited controls) however we've found a workaround for this issue and implemented it in build 471.

In addition, we've added a new QuickStart that shows exactly how to define custom DocumentWindow and ToolWindow classes and reuse them in a DockSite.

MonthCalendar Day Highlighting

Another request we've gotten from several customers is to be able to highlight certain days within our MonthCalendar control.  In build 471, we show the implementation of a custom class that highlights certain days. 

MonthCalendar

The MonthCalendar control showing several types of highlighted days

The same concept could be used to highlight holidays, birthdays, etc. in your own applications.

Enjoy the update!

Sneak Peek: Gauge for WPF - Flight Simulation Gauges

by Bill Henning (Actipro) July 8, 2008 at 01:55

We're just about ready to launch WPF Studio v4.0, probably in the next day or two.  Keep an eye on our site for the official release!

As another sample of what our gauges in WPF Studio v4.0 can do, here is a flight simulation gauges gallery that shows a collage of gauge controls related to a flight simulation.

 FlightSimulation

Flight simulation gauges that can be fully data bound

The full XAML source for these control samples are in our v4.0 Sample Browser.

First Look: Gauge for WPF

by Bill Henning (Actipro) May 30, 2008 at 02:42

We've been hard at work over here on several new products for WPF Studio.  The first that I've been posting about is the WPF Docking and MDI product.  The Docking product is one of the new products that will be part of WPF Studio v4.0.

But we also have one other unannounced product coming to WPF Studio v4.0, and that is Actipro Gauge for WPF.  We're very excited to have teamed up with NextWave to help enhance their forthcoming gauge product and include a split of the code as an Actipro branded product, and part of WPF Studio.

Gauge for WPF Features

Linear

A linear gauge... use to represent any sort of linear values, such as in meters

Gauge for WPF supports the creation of nearly any kind of gauge that you can imagine.  Basic gauge types include circular, linear, and digital gauges.  It includes a wealth of configurable properties, allowing you to completely customize the look and capabilities of your gauges.

Circular

A circular gauge... use to create any sort of instrumentation, meter, or knob

What can you do build with Gauge for WPF? 

  • Electronic measurement gauges
  • Medical measurement gauges
  • Industrial measurement gauges
  • Knobs
  • Digital panels
  • Clocks and watches
  • Thermometers
  • Compasses
  • Vehicle dashboards
  • Flight simulation dashboards
  • Any other sort of circular, linear, or digital gauge

Digital

A digital gauge... use to create clocks or any type of digital readout

What are some common use examples for these sorts of gauges?

  • Business intelligence dashboards
  • Executive summary dashboards
  • Industrial or medical controls and readouts
  • Software interaction with electronic equipment
  • Simple digital readouts
  • Vehicle simulation

Availability

Both Docking for WPF and Gauge for WPF will be included in Actipro WPF Studio v4.0.  We expect final release in the coming weeks.

How to prevent blurry images and lines in WPF

by Bill Henning (Actipro) May 14, 2008 at 23:26

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.

The Issue: Blurry Images and Lines in WPF

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.

A Visual Sample

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.

PixelSnapper

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.

Effective Use of PixelSnapper

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.

Several Options

PixelSnapper includes options for controlling how the separate horizontal and vertical measurements are rounded.   Options for each include None, Floor, Ceiling, and Round.

Sneak Peek: Docking for WPF (Part 2 - XBAP Functionality)

by Bill Henning (Actipro) May 13, 2008 at 08:44

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.

Docking

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!

First Look: Breadcrumb for WPF

by Bill Henning (Actipro) April 14, 2008 at 01:28

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. 

Breadcrumb
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.

Drop-Down Selection

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.

Overflow

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.

BCOverflow

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 

Auto-Minimize

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

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. 

BCProgressiveFade

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.

Edit Mode

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. 

BCEditMode

The Breadcrumb showing an active edit mode

You have total control over how the text path is converted to a node path.

Action Buttons

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.

Progress Bar

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

 BCProgressBar

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.

Themes

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.

First Look: PopupButton for WPF

by Bill Henning (Actipro) April 7, 2008 at 22:04

Another smaller new control that is ready for the upcoming WPF Studio v3.5 maintenance release is PopupButton.

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.