RadOutlookbarItem Commands

2 posts, 0 answers
  1. John Savold
    John Savold avatar
    2 posts
    Member since:
    Nov 2009

    Posted 02 Feb 2012 Link to this post

    I'm building an app with Prism, MVVM and have a RadOutlookBar in a 'navigation region' and would like to change the 'content region' as RadOutlookBarItems are selected.
    I would like to duplicate this type of functionality (from a menu item) in the RadOutlookBarItem
    <telerik:RadMenuItem Header="New Account" Command="{Binding ShowView}" CommandParameter="NewAccount"> 

    Any ideas on how to approach this?

    Thanks,
     John
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 06 Feb 2012 Link to this post

    Hello John,

    In your case I'd suggest using the InvokeCommandAction behavior. It allows attaching a command to an event:
    <telerik:RadOutlookBar x:Name="myOutlookBar"
                            HorizontalAlignment="Left"
                            ItemsSource="{Binding Items}">
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="SelectionChanged">
                <i:InvokeCommandAction Command="{Binding ShowView}" CommandParameter="NewAccount" />
            </i:EventTrigger>
        </i:Interaction.Triggers>
        ...
    </telerik:RadOutlookBar>
    Please give this a try and let us know if it helps.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top