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

Simple way to adjust NavigationHeader's (a border) background color?

10 Answers 75 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Spurk
Top achievements
Rank 1
Spurk asked on 03 Jul 2013, 04:33 PM
Is there a way to change simple elements that are nested inside the ScheduleView's ControlTemplate, like NavigationHeader -- for example the border's background colour--using Style Setters?

Example: I'd like to apply the Windows8 theme, and then specify a different colour for NavigationHeader.

It seems a shame to generate the ControlTemplate's 6100 some-odd lines of XAML to change some minor elements in the ScheduleView's ControlTemplate.

10 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 08 Jul 2013, 08:53 AM
Hi,

When customizing the Windows8Theme colors the easiest approach is by changing the Windows8Palette Palette colors. You can read this help article that described how to customize all of the Palette colors used in Windows8 and Windows8Touch themes.

The next code snippet shows the how to change the navigation header color to orange:
public MainWindow()
{
    Windows8Palette.Palette.AccentColor = Colors.Orange;
    InitializeComponent();
}

Hope this is helpful.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Spurk
Top achievements
Rank 1
answered on 08 Jul 2013, 07:15 PM
Vladi,

Is there any way this can be done simply in XAML?
0
Vladi
Telerik team
answered on 10 Jul 2013, 12:18 PM
Hello,

Unfortunately changing the colors of the Windows8 theme globally is only possible from the code behind. If you want to use an approach that uses only the XAML you will need to override the different Templates/Styles that you want to customize and add your custom colors to the different parts.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Spurk
Top achievements
Rank 1
answered on 11 Jul 2013, 07:31 PM
Thank you Vladi,

One further question;  when I use blend to generate a copy of the template to edit, I notice the view mode selection buttons from the left of the navigation header disappear...  does the generated control template not have them?

Thanks,
S
0
Vladi
Telerik team
answered on 16 Jul 2013, 07:45 AM
Hi,

There is a known issue logged here that is causing the bindings to get lost when the RadScheduleView ControlTempalte is generated with Blend. Unfortunately we are not aware of any workarounds to this issue caused by the extraction with Blend as the ScheduleView control is a complex control that requires lots of data bindings.

If you cannot use the previously described approaches you could use Implicit Styles and customize the RadScheduleViewControlTemplate of the control.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Spurk
Top achievements
Rank 1
answered on 22 Sep 2013, 08:42 PM
Vladi,

When I navigate to c:\...\RadControls for WPF Q2 2013\Themes.Implicit\WPF40\WIndows8Touch and grab the contents of Telerik.Windows.ScheduleView.xaml to work from;  I copy the xaml into a resource dictionary of my current application, but I've run into two problems:

1.  The Windows8Touch .PNG files seem to be missing--where can I get them?  (example:  Line 37 - AppointmentException_Metro.png)

2.  On line 3308:  <local:Category CategoryName="Red Category" CategoryBrush="{StaticResource RedCategoryBrush}"/>  I'm getting the error: The property 'CategoryName' cannot be found in type 'Category' -- Is it possible I'm missing a reference?

Any help is greatly appreciated.
0
Spurk
Top achievements
Rank 1
answered on 22 Sep 2013, 10:11 PM
Vladi,

Two other questions... when using the Windows8Thouch theme, I notice that the current time indicator is missing, out of the box.

Lastly,  If I want to adjust the height of the navigation header, what is the best way to have the elements below the navigation header to move up, instead of stretching, as demonstrated in the attached image?
0
Kalin
Telerik team
answered on 25 Sep 2013, 03:16 PM
Hi Sheldon,

The CurrentTimeIndicator is not shown by default - you need to set the ShowCurrentTimeIndicator property to true in order to show it.

As for the TimeRuller height - you can find the TimeRulerItemTemplateSelector in the theme and set the height for the required template.

Hope this will help you.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Spurk
Top achievements
Rank 1
answered on 28 Sep 2013, 06:14 PM
H Vladi -  I'm reposting these questions because I think you missed it:

Vladi,

When I navigate to c:\...\RadControls for WPF Q2 2013\Themes.Implicit\WPF40\WIndows8Touch and grab the contents of Telerik.Windows.ScheduleView.xaml to work from;  I copy the xaml into a resource dictionary of my current application, but I've run into two problems:

1.  The Windows8Touch .PNG files seem to be missing--where can I get them?  (example:  Line 37 - AppointmentException_Metro.png)

2.  On line 3308:  <local:Category CategoryName="Red Category" CategoryBrush="{StaticResource RedCategoryBrush}"/>  I'm getting the error: The property 'CategoryName' cannot be found in type 'Category' -- Is it possible I'm missing a reference?

Any help is greatly appreciated.
0
Kalin
Telerik team
answered on 01 Oct 2013, 01:28 PM
Hello Sheldon,

We tried the explained and the errors with the missing PNG files also appear on our side, this is so because Visual Studio tries to resolve the source path of the images for the Design Time unsuccessfully. You can easily fix these incorrect the paths the following way:
<ImageSource x:Key="AppointmentItem_Recurrence">pack://application:,,,/Telerik.Windows.Controls.ScheduleView;component/Themes/Images/AppointmentException_Metro.png</ImageSource>

As for the missing brush we don't receive that error. I have attached here our ScheduleView ResourceDictionary file for your convenience.

Hope this will help you.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ScheduleView
Asked by
Spurk
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Spurk
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or