Using ParagraphImageMenuItemViewMode - How to DataBind?

2 posts, 0 answers
  1. Robin
    Robin avatar
    19 posts
    Member since:
    Feb 2011

    Posted 24 Feb 2011 Link to this post

    Hello,

    We try to use the ParagraphImageMenuItemViewMode from the RadMenu sample (Customization -> Integration).

    This works really fine. Just have to srt up the design.

    <local:ParagraphImageMenuItemViewMode Image="../Images/Menu/Integration_2.png"
                                                    Title="Zooming and Scrolling"
                                                    Summary="The Example demonstrates the built-in zooming and scrolling..." />
              <local:ParagraphImageMenuItemViewMode Image="../Images/Menu/Integration_3.png"
                                                    Title="Grouping and Aggregation"
                                                    Summary="RadChart is now able to group and aggregate data..." />

    Now the point where I need some help.

    We want to databind for example the Title property (for localization purposes).
    But that's not possible.
    As far as I know I have to use a DependencyProperty for the desired property.

    What is the best way to implement this?


    I really appreciate the way you are helping us.

    Thanks and best regards
    Robin
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 28 Feb 2011 Link to this post

    Hello Robin,

    If you are using C# just base your class on DependencyObject, type "propdp" on the place you are about to insert the property and hit enter. Fill in the blanks and you are done. You can leave the rest of the properties that are not going to bound the same way they are at the moment.

    I am not sure how you are going to bind these properties though. The view model in the example is set as DataContext. What you are going to bind the Title property to? In such cases I would make the view model's root has a language property and propagate it through its children. And the ParagraphImageMenuItemViewMode would rather implement INotifyPropertyChanged and set its own Title based on the the language.

    Kind regards,
    Pana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
Back to Top