Hi Everyone,

We just released DotNetBar for Windows Forms 9.5 with new Visual Studio 2010 Theme. New theme will let you style the Ribbon and other controls with Visual Studio 2010 color scheme for great, cool looking UI:

Visual Studio 2010 Theme includes styling for menus, toolbars, our form as well as MDI client area:

There are over 25 new features and enhancements in this release:

  • Schedule control now includes ability to collate, logically group calendar item in Timeline view.
  • Schedule control now provides event for custom rendering month view days.
  • Improvements to Analog Clock control when using it for time editing.
  • Switch Button can now be marked read-only and it will show optional lock mark on face of button to indicate this state.

Here are detailed Release Notes. If you have current DotNetBar license download latest release on Customer Only web site. Fully functional trial version is also available. We are working on even more major new exciting features that I can’t wait to share with you….

 

If you have in your WPF project an ResourceDictionary that you use to define resources you can create an instance of it from code like this:

ResourceDictionary res = Application.LoadComponent(
 new Uri("/WpfApplication7;component/RedRibbonBar.xaml", 
 UriKind.RelativeOrAbsolute)) as ResourceDictionary;

Where WpfApplication7 is name of your assembly and RedRibbonBar.xaml is name of your ResourceDictionary.

Another less known way of doing same thing is defining the code-behind for the resource dictionary. I have not found an automated way of doing this in VS.NET 2010 so I do it manually.

First you add x:Class to your ResourceDictionary definition like so:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 x:Class ="WpfApplication7.RedRibbonBar">

Then you add class to your project that holds code-behind and you name it RedRibbonBar.xaml.cs where you change the name to whatever your resource dictionary name is.

The code behind class looks like so:

partial class RedRibbonBar: ResourceDictionary
{
   public RedRibbonBar()
   {
      InitializeComponent();
   }     
}

Note that you need to change RedRibbonBar I used here to the name of your ResourceDictionary. Then you create simply new instance of your dictionary like so:

ResourceDictionary res = new RedRibbonBar();
 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

© 2009 Denis Basaric: DevComponents Blog