Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
XamRibbon/ApplicationMenu2010 Binding Error on opening ApplicationMenu.
posted

Hello, 

We are using the XamRibbon in combination with ApplicationMenu2010 for one of our applications.

Currently we are using the Office2013 Theme and it seems when first time opening the ApplicationMenu2010/Backstage  a Binding Operation fails.

The BindingError: 

System.Windows.Data Error: 40 : BindingExpression path error: 'ChildDesiredWidth' property not found on 'object' ''Button' (Name='BackButton')'. BindingExpression:Path=ChildDesiredWidth; DataItem='Button' (Name='BackButton'); target element is 'ColumnDefinition' (HashCode=123050); target property is 'MinWidth' (type 'Double')

I already found a similar Thread which is still unresolved up to today: 

https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/119262/bindingexpression-path-error-with-xamribbon-application-menu-2010

The MainWindow.xaml looks like following and MainWindow.xaml.cs has its default content.

 <igWPF:RibbonWindowContentHost>
        <igWPF:RibbonWindowContentHost.Ribbon>
            <igWPF:XamRibbon Theme="Office2013">

                <igWPF:XamRibbon.ApplicationMenu2010>

                    <igWPF:ApplicationMenu2010 x:Name="AppMenu" Caption="Test">

                        <!--  Shows debug option if Mode is Internal  -->
                        <igWPF:ApplicationMenu2010Item
                            VerticalAlignment="Center"
                            Header="TestItem"
                            Visibility="Visible" />
                    </igWPF:ApplicationMenu2010>
                </igWPF:XamRibbon.ApplicationMenu2010>
            </igWPF:XamRibbon>
        </igWPF:RibbonWindowContentHost.Ribbon>
    </igWPF:RibbonWindowContentHost>

How can i fix this behaviour?

With best regards,

Armin 

Parents
No Data
Reply
  • 34810
    Verified Answer
    Offline posted

    Hello Armin,

    I have been investigating into the behavior you are seeing, and I have reproduced it. There appears to be a ColumnDefinition for a Grid in the ApplicationMenu2010 that has its MinWidth bound to a ChildDesiredWidth property of a Button that does not exist. I have changed this to be bound to DesiredSize.Width and this appears to resolve the issue.

    I will personally be making this fix for a future release of the Office2013 theme, but you can use the attached sample project to work around this behavior.

    Please let me know if you have any other questions or concerns on this matter.

    XamRibbonAppMenuBindingError.zip

Children
No Data