Ribbon RibbonDropDownButton

Jan 19, 2009 at 8:40 AM

Why if I set the Name property of the MenuItem in xaml I'll not found the property in the callback function ?
example:

                        <r:RibbonDropDownButton Command="me:AppCommands.OtherReports">
                            <MenuItem Header="Cash Flow Report" Command="me:AppCommands.DropDownItemCommand" Name="CashFlowReport"/>
                            <MenuItem Header="Favorites Report" Command="me:AppCommands.DropDownItemCommand" Name="FavoritesReport"/>
                            <MenuItem Header="Spending Report" Command="me:AppCommands.DropDownItemCommand" Name="SpendingReport"/>
                            <MenuItem Header="Savings Report" Command="me:AppCommands.DropDownItemCommand" Name="SavingsReport"/>
                            <MenuItem Header="Credit Report" Command="me:AppCommands.DropDownItemCommand" Name="CreditReport"/>
                        </r:RibbonDropDownButton>

is there any planning about a new release of Ribbon ?

Thanks
Marco
Jan 19, 2009 at 4:07 PM
Edited Jan 19, 2009 at 4:08 PM
Hi Marco,

Try building the app and then see if the property shows up.  Sometimes things declared in Xaml don't show up in code until the project has been rebuilt. 

As for a new release, as said in this thread, We are shooting for an out of band release in mid-2009.  That's as specific a date as we can give at this point.
Jan 19, 2009 at 4:21 PM
Hi Carolesn,

thanks for your quick answer. I already did it many times but is seems when I get the EventArgs the RibbonCommand doesn't contain the Name property.
Here is an example about the callback function:

        private void OnDropDownItemCommand(object sender, ExecutedRoutedEventArgs e)
        {
            RibbonCommand r = (RibbonCommand) e.Command;
            r.Name ---> is ""

Marco
Jan 27, 2011 at 8:14 PM

 

It's an old post, and you probably already figured it out... but... 

	private static void DropDownSelected(object sender, ExecutedRoutedEventArgs e)
        {
            string sourcetext = ((RibbonCommand)e.Command).LabelTitle;
            MessageBox.Show(sourcetext);
        }