ComponentOne Scheduler for WPF and Silverlight
Scheduler Components and Controls / Scheduler for Silverlight Appearance / C1Scheduler WPF Themes / Creating a Custom Theme / Testing the Theme Pack
In This Topic
    Testing the Theme Pack
    In This Topic

    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.Schedule.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:

      XAML
      Copy Code
      <Application.Resources>
            <ResourceDictionary Source="/C1SchedulerThemePack;component/themes/generic.xaml" />
      </Application.Resources>
      

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

      XAML
      Copy Code
      <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.