As I can see in your code you create a custom user control which derives from our RadRibbonView
control. Furthermore, you expose a Content
property and now your requirement is to visualize that content. You need to have in mind that when you create a custom Control
with custom properties in it, you also need to define a custom ControlTemplate
that will define how your properties will be visualized. Please note that the RadRibbonView
do not expose Content
property and this is why your content will not be visualized.
Maybe you need to derive only the RadRibbonGroup
and define the Content
property in it. Furthermore, you will have to extract its default ControlTemplate
and customize it. You can replace the ItemsPresenter
(defined in the ControlTemplate
) with a ContentPresenter
and bind its Content
to your custom property. Also, please note that you will be able to define all the buttons that you need to reuse in the same ControlTemplate
Let me now get to the error that you report. Such error may be caused by the fact that elements with the same (x:)Name
property exist more than once in your application. Please make sure that there are no (x:)Name
On the other hand, you can consider using an MVVM approach in your application. For more information you can take a look at our online demonstration project
For your convenience I implemented the approach with the derived RadRibbonGroup
in the attached project. Also, you will be able to find a basic implementation of the MVVM approach that can be used as a start up project. Please take a look at the attached project and let me know if it works for you.
Pavel R. Pavlov
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>