ComponentOne Scheduler for WPF: Using Scheduler for WPF > Scheduler for WPF Appearance > Creating a Custom Theme > Testing the Theme Pack

Testing the Theme Pack

Once your first theme pack is created, make a test application for it.

1.   Select File | Add | New Project.

2.   Choose WPF Application from the list of Templates, specify a name, and click OK.

3.   In the Solution Explorer, add a reference to the C1.WPF.C1Schedule.dll assembly to the new project you just added.

4.   Also add a reference to the assembly that the C1SchedulerThemePack project generated here. It will be located in your C1SchedulerThemePack project folder, within bin\Debug: C1SchedulerThemePack.dll.

5.   Open the Window1.xaml file in Design view and add a C1Scheduler control from the Toolbox.

6.   Open the Application.xaml file and add a reference to the generic.xaml file from the C1SchedulerThemePack project to the application resources using the following XAML:

<Application.Resources>

       <ResourceDictionary Source="/C1SchedulerThemePack;component/themes/generic.xaml" />

</Application.Resources>

7.   Go back to the Window1.xaml file and change the Theme property of the C1Scheduler control to MyTheme using the following XAML. Delete grid tags.

<my:C1Scheduler Name="c1Scheduler1"

             Theme="{DynamicResource {ComponentResourceKey TypeInTargetAssembly=my:C1Scheduler,

ResourceId=MyTheme}}"></my:C1Scheduler>

8.   In the Solution Explorer, right-click the name of your new WPF application project, and choose Set as Startup Project.

9.   Build the application and view the results in designer.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.