Page 1 of 1

RibbonButton Description Tect

Posted: Tue Jul 26, 2011 5:32 pm
by MtheP
I have manage to add a RibbonButton to the RibbonBar but I am unsure how to add the Descriptive Text. Also is there a way to add the button via the XAML


RibbonButton Description Tect

Posted: Wed Jul 27, 2011 12:55 am
by Anton Lozovskiy
Hello,

Please use the following code:











Thank you.

RibbonButton Description Tect

Posted: Wed Jul 27, 2011 1:54 am
by MtheP
Could you please give me the abobe example XAML in context of the ViewerControl



RibbonButton Description Tect

Posted: Thu Jul 28, 2011 12:37 am
by Andrew
Hello,

The way you to add a button in the ToolBar in XAML is not possible. You can only do it from the code. Please see the code:

RibbonButton button = new RibbonButton();
button.MinWidth = 150;
button.Height = 24;
button.Content = "Descriptive Text";
viewerControl.MainToolBar.Items.Add(button);

Thank you.