RadioButton ItemTemplate

Ribbon for WPF Forum

Posted 14 years ago by EXAKOM
Version: 10.2.0531
Avatar
Hello,
I am populating a PopupButton with some RadioButton items from an ObservableCollection.
The list is loaded fine, but the RadioButtons are not shown as Button as they should when their Context is a MenuItem.
I must do something wrong for not getting the correct UI style.
Any hint to solve my problem?

Here's my data template:

<DataTemplate x:Key="myItemTemplate">
   <ribbon:RadioButton Label="{Binding Name}"
      Command="{x:Static commands:myCommands.myCommand}">
   </ribbon:RadioButton>
</DataTemplate>
...
<ribbon:PopupButton>
   <ribbon:Menu ItemTemplate="{StaticResource pageSizeItemTemplate}"/>
</ribbon:PopupButton>
Thanks :)

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nicolas,

Perhaps try to explicitly add Context="MenuItem" in your ribbon:RadioButton in the DataTemplate.


Actipro Software Support

Posted 14 years ago by EXAKOM
Avatar
Thank you, it solved my problem.
There is a problem though, the orange color of the selected is applied on top of the icon I have.
In Office 2010, the Icon is on top of the orange background when the item is selected.
Can you see what I am talking about? Do you have the same behaviour? Can you fix this?
Thanks for your help! :)
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nicolas,

Radio buttons should be using the normal menu item template used by Buttons when the Context is MenuItem. We'd probably need to see a sample of what you mean, you can email it to our support address.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.