Hi All,
i am using Wpf 4.0 and PRISM for my dot net application (Visual Studio 2010).
I have one requirement that I have to open a new screen (View) on the click of one of the items of context menu.
I have written the following code for it in my XAML :
Where "ViewErrors" is my new screen need to be opened on the click of the context menu.
kindly let me know the solution.
Thanks in advance !!!!!!!
i am using Wpf 4.0 and PRISM for my dot net application (Visual Studio 2010).
I have one requirement that I have to open a new screen (View) on the click of one of the items of context menu.
I have written the following code for it in my XAML :
<
framework:RTPOGridView
Grid.Row
=
"1"
x:Name
=
"orderList"
Margin
=
"7,0,7,0"
VerticalAlignment
=
"Stretch"
ItemsSource
=
"{Binding dailyload}"
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
x:Name
=
"ViewErrorsContextMenu"
IsEnabled
=
"True"
>
<
telerik:RadContextMenu.Items
>
<
telerik:RadMenuItem
Header
=
"View Errors"
x:Name
=
"itemViewErrors"
IsEnabled
=
"True"
Command
=
"{Binding Path=ViewErrorsCommand}"
>
</
telerik:RadMenuItem
>
</
telerik:RadContextMenu.Items
>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
<
framework:RTPOGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Customer"
DataMemberBinding
=
"{Binding CustomerPerson}"
Width
=
"*"
/>
<
telerik:GridViewDataColumn
Header
=
"Product"
DataMemberBinding
=
"{Binding Product}"
Width
=
"*"
/>
</
framework:RTPOGridView
>
and the code which i wrote for it in View Model is as follows.
public void OnViewErrorsCommand(object sender, RoutedEventArgs e)
{
_dialogController.ShowDialog(_moduleController, ApplicationConstants.OrdersViewNames.ViewErrors);
}
kindly let me know the solution.
Thanks in advance !!!!!!!