This is a migrated thread and some comments may be shown as answers.

RadOutlookbarItem Commands

1 Answer 98 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
John Savold
Top achievements
Rank 1
John Savold asked on 03 Feb 2012, 12:28 AM
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

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 06 Feb 2012, 01:57 PM
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 >>
Tags
OutlookBar
Asked by
John Savold
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or