This is a migrated thread and some comments may be shown as answers.

Is it possible to add a few extra controls to the ScheduleView toolbar?

9 Answers 245 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Rod Yager
Top achievements
Rank 1
Rod Yager asked on 16 Dec 2010, 09:41 PM
Is there a way to add extra controls to the ScheduleView toolbar (where "Month", "Week", "Day" buttons are shown) ? I would like to add a combobox to help drive the behavior of the schedule. I know I can add this above the ScheduleView but I am trying to conserve on space.

Thanks,
Rod

9 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 20 Dec 2010, 09:08 AM
Hello Rod Yager,

Yes, you can add other controls in the Navigation header of RadScheduleView. What you need to do is add them in the control template of the control. You can generate it in Expression Blend. In order for the navigation header to render properly, please verify that the following snippet is present there. (If not, please add the Bindings):

<ListBox x:Name="ViewModeSelection" Grid.Column="0" SelectionMode="Single" ItemsSource="{TemplateBinding ViewDefinitions}" SelectedItem="{Binding ActiveViewDefinition, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
...
</ListBox>

Add any controls in the following border:
<Border x:Name="NavigationHeader">
...
</Border>


Regards,
Dani
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Rod Yager
Top achievements
Rank 1
answered on 20 Dec 2010, 05:15 PM
Thanks! When I extract and use the style from expression blend, the Office_Black is basically hard coded into the template now. How can I make it so that the ScheduleView will still take on themes when changing them via the StyleMananger?

Thanks,
Rod
0
Dani
Telerik team
answered on 22 Dec 2010, 10:42 AM
Hi Rod Yager,

Blend only has the option to generate the default theme which is Office Black. I have attached a resource dictionary which represents the Expression Dark theme for RadScheduleView.You can use this in your project and customize it  according to your needs.  Unfortunately , you cannot use both a custom theme (with your additonal controls added) and the functionality of switching themes with telerik:StyleManager, because the StyleManager will override your custom theme and your customizations will be lost.

All the best,
Dani
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Chris
Top achievements
Rank 1
answered on 01 Feb 2011, 12:15 AM
Could you provide the OfficeBlue set of styles for the ScheduleView and/or tell me how to extract them from Blend.  Like Rod, I can extract the default OfficeBlack Theme, but don't know how to grab the others.  Thanks.
0
Dani
Telerik team
answered on 01 Feb 2011, 08:26 AM
Hi Chris,

Please, find attached the Office Blue theme for RadScheduleView from the Q3 SP1 release.

Regards,
Dani
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Chris
Top achievements
Rank 1
answered on 01 Feb 2011, 04:16 PM
Hi Dani,

Thanks so much for the quick response.  However, I'm having a bit of problem with namespaces.

I'm running Visual Studio 2010 Premium with Telerik RadControls for WPF Q3 2010.
I've set the following references:
- Telerik.Wiindows.Controls
- Telerik.Windows.Controls.Input
- Telerik.Windows.Controls.Navigation
- Telerik.Windows.Controls.ScheduleView
- Telerik.Windows.Data

When I start with a compilable program, then create a new ResourceDictionary and simply paste the XAML you provided in the ResourceDictionary, the local namespace is not recognized.  Doing a search and replace from local: to telerik:  seems to solve some of the problems.  However, there are still a number of items that appear to require a reference to Telerik.Windows.Controls.ScheduleView, such as the OrientedGroupHeadercontentTemplateSelector and renceStateIsExeptionVisibilityConverter classes.  When I create a namespace that refers to Telerik.Windows.Controls.ScheduleView...still no luck.  For what it's worth, I ran into the same issue when I tried the ExpressionDark XAML, except that replacing the local: namespace with the telerik: namespace worked completely, in that case.

Thanks in advance for your help.

Chris
0
Chris
Top achievements
Rank 1
answered on 02 Feb 2011, 12:11 AM
Hi Dani,

I should also add that I'm using version 2010.2.1314 (the trial version) of RadControls for WPF...the latest version.  While waiting for your response, I created a new WPF project, added references to all Telerik assemblies (except Scheduler, although I did add ScheduleView) added a blank ResourceDictionary and pasted your code into the ResourceDictionary.  It still did not recognize your local namespace nor could I find the proper namespaces (that would work) for InvertedNullToVisibilityConverter, TimeRulerItemTemplateSelector, RecurrenceStateIsExeptiontoVisibilityConverter and more.  Seems like since your code was from the Q3 SP1 release and my code is the Q3 SP1 release, it should work.  I really need this piece to finish our evaluation of scheduler controls because we have to move forward into the project.  Thank you in advance for your response.

Chris
0
Dani
Telerik team
answered on 03 Feb 2011, 07:46 AM
Hello Chris,

The local namespace should point Telerik.Windows.Controls namespace in Telerik.Windows.Control.ScheduleView assembly:
xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"

It is not truely a local namespace. The resource dictionary I sent you was taken directly from the sources of RadScheduleView for Q3 SP1 , that is why it has a namespace named "local" (as opposed to what Blend might generate for you). You might want to change it to something more semantically correct like telerikScheduleView and change all in spots it appears.

A working sample is attached for your convenience.

Kind regards,
Dani
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Chris
Top achievements
Rank 1
answered on 05 Feb 2011, 02:04 AM

Hi Dani,

Thanks for your response. I realize that it's not a local namespace. I was just referring to the namespace that you had named "local". I suppose I should have put it in double quotes to make it more clear.  However, as I suspect you know, the problem *was* the "local" namespace.  Within the ScheduleView-OfficeBlue-Q3SP1.zip file you originally attached was a file named Schedule.xaml.  The namespaces in that file were:

- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
- xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
- xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
- xmlns:local="clr-namespace:Telerik.Windows.Controls"

However, in the RadSheduleView-Namespaces-Q3-SP1.zip file you just attached is a file named Generic_OfficeBlue.xaml, which is exactly the same as the Schedule.xaml file you sent earlier, except its namespaces are:

- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
- xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
- xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
- xmlns:local="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"

As you can see, the only difference is in the "local" namespace, as I originally thought, the difference being the inclusion of the "assembly=Telerik.Windows.Controls.ScheduleView" fragment.

And that piece is what solved the problem.  It nows works perfectly and is exactly what I was looking for.  Again, thanks so much hanging with me on this.

Sincerely,

Chris

Tags
ScheduleView
Asked by
Rod Yager
Top achievements
Rank 1
Answers by
Dani
Telerik team
Rod Yager
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Share this question
or