How do I make controls above the RibbonView get the focus?

1 Answer 76 Views
RibbonView and RibbonWindow
Alexander
Top achievements
Rank 1
Iron
Alexander asked on 26 Aug 2022, 07:46 AM

I am trying to implement function similar to a Acount info in Visual Studio in my App build On RibbonWindow/RibbonView(WPF).

Somethink like this:

Controls do not get focus if the RibbonWindow is not Maximzed. If it is Maximzed they get focus only if mouse enters from bottom side.

Here is small reproducer .

Do I miss some setting in RibnbonWindow/RibbonView? Is it Posible with Telerik Framework?   

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Stenly
Telerik team
answered on 30 Aug 2022, 02:04 PM

Hello Alexander,

I was able to reproduce this behavior when running the provided sample project.

To prevent this from occurring, you could set the WindowChrome.IsHitTestVisibleInChrome attached property to True. This way, the elements that are placed in the title bar of the RadRibbonWindow will be hit-testable. To use this attached property, add the following namespace:

xmlns:shell="clr-namespace:Telerik.Windows.Controls.RibbonView.Shell;assembly=Telerik.Windows.Controls.RibbonView"

Then, set the property onto the elements that will be hit-testable in the title bar:

<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right"  VerticalAlignment="Top" Margin="0 5 100 0">
    <TextBox Text="test" shell:WindowChrome.IsHitTestVisibleInChrome="True"/>
    <Button Content="Click" Margin="10 0 0 0" shell:WindowChrome.IsHitTestVisibleInChrome="True"/>
</StackPanel>

The produced result is as follows:

Could you give this suggestion a try and let me know how it goes?

Regards,
Stenly
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Alexander
Top achievements
Rank 1
Iron
commented on 30 Aug 2022, 02:46 PM

Thanks a lot! this works for my case!
Tags
RibbonView and RibbonWindow
Asked by
Alexander
Top achievements
Rank 1
Iron
Answers by
Stenly
Telerik team
Share this question
or