Hi,
For our MDI app, I'd like it so that windows can display their visual focus state. Do the RadWindows expose any templates (focused/unfocused) for this?
Specifically, the case is multiple windows on the screen. One window has the active focus, and is visually highlighted from the rest. This window may partially obscure another. When the obscured window's content region/window border is clicked, it will become the active focused window and popup in front so that it is no longer obscured.
I am having an issue implementing this and would appreciate pointers/code sample on how to capture the focus when any item in the window's content is clicked. How does one go about capturing the focus event from any item, and bubbling it to the containing window and then changing the visual template. The same likewise for losing focus and also for clicking on the window's borders.
Thanks,
Nic
For our MDI app, I'd like it so that windows can display their visual focus state. Do the RadWindows expose any templates (focused/unfocused) for this?
Specifically, the case is multiple windows on the screen. One window has the active focus, and is visually highlighted from the rest. This window may partially obscure another. When the obscured window's content region/window border is clicked, it will become the active focused window and popup in front so that it is no longer obscured.
I am having an issue implementing this and would appreciate pointers/code sample on how to capture the focus when any item in the window's content is clicked. How does one go about capturing the focus event from any item, and bubbling it to the containing window and then changing the visual template. The same likewise for losing focus and also for clicking on the window's borders.
Thanks,
Nic
5 Answers, 1 is accepted
0
Hi Nic,
We had this functionality in our first releases of the control, but since there are some problems with the focus of popup controls introduced by the Silverlight framework, we had decided to obscure this functionality until we find some workaround. We will do our best to include that with our next release. Until then you can use a workaround to our missing implementation of handling focus states like this.
The colors are just an obvious example, so you can play with this however you like. Thank you for contacting us, and feel free to contact us for any futher support.
Sincerely yours,
Hristo Borisov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
We had this functionality in our first releases of the control, but since there are some problems with the focus of popup controls introduced by the Silverlight framework, we had decided to obscure this functionality until we find some workaround. We will do our best to include that with our next release. Until then you can use a workaround to our missing implementation of handling focus states like this.
class TestWindow : RadWindow |
{ |
public TestWindow() |
{ |
this.BorderBackground = new SolidColorBrush(Colors.Blue); |
} |
protected override void OnGotFocus(RoutedEventArgs e) |
{ |
base.OnGotFocus(e); |
this.BorderBackground = new SolidColorBrush(Colors.Red); |
} |
protected override void OnLostFocus(RoutedEventArgs e) |
{ |
base.OnLostFocus(e); |
this.BorderBackground = new SolidColorBrush(Colors.Blue); |
} |
} |
The colors are just an obvious example, so you can play with this however you like. Thank you for contacting us, and feel free to contact us for any futher support.
Sincerely yours,
Hristo Borisov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nic
Top achievements
Rank 1
answered on 06 Feb 2009, 10:01 PM
Hristo,
Thank you once again. I had been thinking of template parts for focus/lost focus for the window but this solution works just fine for now.
Incidentally, for customizing the windows, in a previous post I think it was mentioned that the window's template parts would be updated and/or documented, and made available for end user customization. Is that going to be in the next release of the silverlight controls and do we have a timeframe of this release?
I'd like to add additional widgets/buttons alongside the pin/minimize/maximise/close buttons, and am thinking that modifying the corresponding template part would be the way to go. Is this something I can do now or can do once the next release becomes available?
Thanks again.
Nic
Thank you once again. I had been thinking of template parts for focus/lost focus for the window but this solution works just fine for now.
Incidentally, for customizing the windows, in a previous post I think it was mentioned that the window's template parts would be updated and/or documented, and made available for end user customization. Is that going to be in the next release of the silverlight controls and do we have a timeframe of this release?
I'd like to add additional widgets/buttons alongside the pin/minimize/maximise/close buttons, and am thinking that modifying the corresponding template part would be the way to go. Is this something I can do now or can do once the next release becomes available?
Thanks again.
Nic
0
Hello Nic,
The template of the window is currently available for customizations. I am attaching an example of how to change the template of the window control.
Best wishes,
Miroslav Nedyalkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Best wishes,
Miroslav Nedyalkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Nic
Top achievements
Rank 1
answered on 10 Feb 2009, 10:09 PM
Hi Miroslav,
Thanks for the example with the control template. I'm now able to add my own buttons next to the pin, minimise, maximise and close buttons, and hook those up. It's exactly what I was hoping to get.
Regarding two window, with one obscuring the other I notice that if I click on the window border of the obscured window, it will receive focus and popup in front of the other window.
However, if I just click on the window content of the obscured window, then it receives focus but does not popup in front. Is there a way to get this to work as if I had clicked the window border?
I know Hristo mentioned there were issues with the focus in his post above. Wondering if this is that issue or is there something else?
Thanks,
Nic
Thanks for the example with the control template. I'm now able to add my own buttons next to the pin, minimise, maximise and close buttons, and hook those up. It's exactly what I was hoping to get.
Regarding two window, with one obscuring the other I notice that if I click on the window border of the obscured window, it will receive focus and popup in front of the other window.
However, if I just click on the window content of the obscured window, then it receives focus but does not popup in front. Is there a way to get this to work as if I had clicked the window border?
I know Hristo mentioned there were issues with the focus in his post above. Wondering if this is that issue or is there something else?
Thanks,
Nic
0
Hello Nic,
Sincerely yours,
Miroslav Nedyalkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Actually, this is the expected behavior of RadWindow. As Hristo mentioned, there are some problems with the focus and the Z-ordering of the popup controls introduced by the Silverlight framework and we decided to cut this functionality down. We will continue our research to improve the mechanism and implement it back in the control.
Sincerely yours,
Miroslav Nedyalkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.