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

Customizing RadWindow Titlebar

20 Answers 433 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sanjay
Top achievements
Rank 1
Sanjay asked on 12 Jan 2009, 04:10 AM
Hi,

I would like to know if there is a way to customize the titlebar of the RadWindow control. Basically, I would like to place a button next to the minimize and maximize buttons and attach an event handler to it. Kindly let me know if this is possible.

Thanks,
Sanjay.

20 Answers, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 12 Jan 2009, 09:08 AM
Hi Sanjay,

Currently you cannot set custom buttons next to the tool buttons. We are working on improving the blend support of our controls, in which you will be able to edit the control template of our controls, and thus customize its look. Unfortunately, I cannot say whether the support will be for our service pack or Q1 release. We are sorry for this inconvenience and we hope that this won't be a show stopper for you.

All the best,
Hristo Borisov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Droidilate
Top achievements
Rank 1
answered on 03 Nov 2010, 09:06 PM
Any update on this?

I've been contemplating purchasing for months, and this sort of thing is why I haven't yet.

A little while back, I created my own Window control, and it was very easy to just expose the titlebar container (a grid in this case with two columns and two respective stack panels) to the control consumer.  Then they could simply add linear gradient brushes to that container's background property (and set the stack panels to transparent).  I was able to easily create custom, glossy titlebars and add my own buttons.

From the consumer's perspective, it was very easy.  I would expect it to be just as easy (if not more so) with a professional, commercial tool set.

Am I missing something here?

-d

0
Konstantina
Telerik team
answered on 05 Nov 2010, 11:24 AM
Hi Droidilate,

Thank you for contacting us.

You have 2 options:
1. You can set the HeaderTemplate property and apply a DataTemplate which will fit your requirements.
2. You could edit the Header of the RadWindow with Expression Blend very easy.

Please let us know if you need further assistance.

All the best,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Droidilate
Top achievements
Rank 1
answered on 05 Nov 2010, 10:55 PM
I'm afraid that method 1 will not work for recoloring the titlebar (though I could use it for adding icons for sure!).

When I replace the TemplateHeader, it does not reach all the way to the left side of the control.  So Even if I recolor where the template is, it doesn't get rid of that default gray, linear gradient titlebar.

I don't just want to use a default theme.  I want to change the color on the fly, even in such a fashion as to create color animations or state indications.

Come on guys, it shouldn't be this hard.  Why isn't the real background brush for the root control exposed?  One property, immediate results.

What should I do?  Perhaps I should just customize the control template?  Is that advisable?

Thanks!! :)
0
Droidilate
Top achievements
Rank 1
answered on 05 Nov 2010, 11:33 PM
It looks like method 2 works pretty good because Blend makes it a snap to customize a control template.  I see the WindowHeaderBackground resource and can modify it.  Hopefully I will also be able to modify this at run time.

Please, let me know if this was what you meant by using Blend (to customize the control template) or if I'm on the wrong path.

Thanks!
0
Konstantina
Telerik team
answered on 09 Nov 2010, 10:55 AM
Hello Droidilate,

Thank you for your reply.

Yes, the WindowHeaderBackground is the resource you need to change, that was exactly what I meant by editing the Header in Expression Blend. Of course, you can change pretty much everything, that is way this is the recommended way for customizing the look and feel of our controls.

Please let us know if you need further assistance.

Kind regards,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Raphael
Top achievements
Rank 1
answered on 29 Mar 2011, 02:05 PM
Hello,

I try to modify my header adding custom buttons. The buttons appear but I cannot click on my buttons because the header bar has got the focus and allows me moving the window but not clicking my buttons.
Do you have a solution for this problem ?
Remarks : I tried with CanMove property to False but no more expected result.

Thanks

Raphael
0
Konstantina
Telerik team
answered on 31 Mar 2011, 11:52 AM
Hi Raphael,

You can try setting the IsHeaderHitTestVisible property of the RadWindow to True. In that way the buttons will become clickable.

Please let us know if you have further questions.

Regards,
Konstantina
the Telerik team
0
Raphael
Top achievements
Rank 1
answered on 31 Mar 2011, 01:04 PM
Hi Constantina,

Thank you for your support.
It works very well.

Raphael
0
Enal
Top achievements
Rank 1
answered on 07 Oct 2011, 06:45 PM
Hi - 

When attempting IsHeaderHitTestVisible I get a notification that it is obsolete and to use WindowHost.HitTestable instead.
But I don't see any related documentation.

Do you have an example, how to use this please?

Thanks!
0
Konstantina
Telerik team
answered on 11 Oct 2011, 11:26 AM
Hi Enal,

Yes, this property is marked obsolete. It is not needed anymore.
Could you please share with us why do you need to set it?

Best wishes,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Enal
Top achievements
Rank 1
answered on 11 Oct 2011, 12:29 PM
Hi Konstantina -

I apply a DataTemplate as HeaderTemplate, which works fine with the defaults...
However, if I apply a Theme with the theme manager (either to the RadWindow or application-wide) a few things stop working...

1. The controls in the header template become unresponsive. This can be solved by setting 'obsolete' IsHeaderHitTestVisible to true (which I found by trial and error and googling, which led to this thread...)

2. (Unrelated to IsHeaderHitTestVisible, but maybe similar cause...) The stretch of the Header template breaks. In defaults I can place a grid as the template and it stretches all the way from the left start of the header to just left of the standard window controls. Once a Theme is being applied, the header template does not stretch any longer regardless of any setting. I have a workaround now that intercepts resize events on the window and forcibly sets the header width to window width-100, but it feels like a hack.

Ideally I would like things to behave identically with or without a Telerik theme applied with StyleManager :-)

Thanks and Best!

(I should mention that I have another post regarding #2: http://www.telerik.com/community/forums/silverlight/window/theming-vs-headertemplate-issue-on-stretch.aspx)
0
Konstantina
Telerik team
answered on 13 Oct 2011, 12:43 PM
Hello Enal,

Then, we will continue the discussion there in order the communication to be more structured. I believe your question is already answered.

Greetings,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Enal
Top achievements
Rank 1
answered on 13 Oct 2011, 01:51 PM
Hi Konstantina - 

Nope, there are 2 issues.

1. The one here, which is about the issue discussed in this thread
2. The 'stretch' issue (which may or may not be related - just FYI when investigating), which is discussed in the other thread.

This here is about #1, 'IsHeaderHitTestVisible', which seems to be required despite being marked as obsolete.

Best!
e
0
Konstantina
Telerik team
answered on 17 Oct 2011, 02:36 PM
Hi Enal,

Which theme you are using? Not OfficeBlack? If so, a fix for this issue will be provided with Q3 2011 release of the controls, which due in the middle of November.
Sorry for the caused inconvenience.

All the best,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Enal
Top achievements
Rank 1
answered on 17 Oct 2011, 02:50 PM
Hi Konstantina -

We are defaulting to Expression_DarkTheme - and soon want to offer the user a theme selector to suit their preferences.

I guess it's not a big deal since we can just set the property despite the IDE complaining. I was just wondering if there is more info about WindowHost.HitTestable (which is suggested to use instead) since I cannot find related docs. Or shall we just ignore it?

Thanks!

0
Konstantina
Telerik team
answered on 18 Oct 2011, 10:38 AM
Hi Enal,

The WindowHost.HitTestable attached property has to be set in order the elements in the header to receive the events. The Buttons receive the events by default, because this property is set by default.

All the best,
Konstantina
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Jittu
Top achievements
Rank 1
answered on 17 Sep 2012, 09:15 PM
Can I change the Top color of the Title bar of Rad WIndow?
Because I dont see any property related to it.

Thanks
0
Masha
Telerik team
answered on 20 Sep 2012, 08:36 AM
Hi Sanjay,

You can edit very easily the template and the style of the RadWindow with Expression Blend. Just drop a RadWindow control into the design surface, right-click it and choose from the menu Edit Template-> Edit a Copy. Then Blend will generate all the needed resources for customization. 

 You could refer to our online documentation about
 
In the attached project I demonstrated the approach.

I hope this helps. 
Kind regards,
Maria
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
baggu
Top achievements
Rank 1
answered on 20 Mar 2013, 05:21 PM
Hi,

I have a similar issue. I have a set of custom commands and standard commands. Custom commands show up on the title bar and standard commands show as a drop down on clicking one of the buttons on title bar. Now when i maximize the Radwindow, i want all the commands to show on the title bar. How do i achieve this when i have two separate calls for custom and standard buttons.

Thanks,
Baggu
Tags
Window
Asked by
Sanjay
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
Droidilate
Top achievements
Rank 1
Konstantina
Telerik team
Raphael
Top achievements
Rank 1
Enal
Top achievements
Rank 1
Jittu
Top achievements
Rank 1
Masha
Telerik team
baggu
Top achievements
Rank 1
Share this question
or