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

RibbonView ApplicationMenu displayed in wrong position

2 Answers 124 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
SPE
Top achievements
Rank 1
SPE asked on 01 Feb 2017, 11:56 AM

ApplicationMenu is displayed in wrong position.

Some PCs display properly but others are not.

 

I used very simple xaml. Telerik for WPF version is 2017.1.117.45.

<Window x:Class="RadRibbonTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:RadRibbonTest"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadRibbonView ApplicationButtonContent="File" >
            <telerik:RadRibbonView.ApplicationMenu>
                <telerik:ApplicationMenu>
                    <telerik:RadRibbonButton Text="New" />
                </telerik:ApplicationMenu>
            </telerik:RadRibbonView.ApplicationMenu>
        </telerik:RadRibbonView>
    </Grid>
</Window>

2 Answers, 1 is accepted

Sort by
0
SPE
Top achievements
Rank 1
answered on 01 Feb 2017, 12:24 PM

It looks like related to tablet mode.

When I put below code in MainWindow constructor, the problem is disappeared.

var MenuDropAlignmentField = typeof(SystemParameters).GetField("_menuDropAlignment", BindingFlags.NonPublic | BindingFlags.Static);
if (SystemParameters.MenuDropAlignment && MenuDropAlignmentField != null)
{
    MenuDropAlignmentField.SetValue(null, false);
}

 

I refered the post : http://stackoverflow.com/questions/17858055/w8-default-tablet-settings-conflicts-with-wpf-layout

 

0
Martin Ivanov
Telerik team
answered on 06 Feb 2017, 10:50 AM
Hello,

Good to hear that you found how to workaround this behavior. This comes from the mechanism used by the OS to handle its popup elements positioning. It is expected with the RadRibbonView control when the default popups alignment is changed. There is a feature request for implementing a mechanism that allows changing this setting for the ribbonview. You can find it logged in the UI for WPF feedback portal.

Regards,
Martin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
RibbonView and RibbonWindow
Asked by
SPE
Top achievements
Rank 1
Answers by
SPE
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or