There are the steps I used to create command and attach command in WPF application. I used WPF Composite as my framework to create WPF application. In the main Shell application's navigation Panel, I attach the command to each button.
1. Definition:
In the static class : appcommands
public static RoutedUICommand ProductSearchRequestCommand { get; private set; }
2. create instance
private static void InitializeCommands()
{
ProductSearchRequestCommand = new RoutedUICommand();
}
3. Event handler enabling or disabling command execution
in the main Module class
private void ProductSearchRequestCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
e.Handled = true;
}
4.Command Event handler in the main module class. Here we will execute business logic
private void ProductSearchRequestCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
regionManager.RegisterViewWithRegion(RegionNames.SearchRegion, typeof(ProductSearchCriteriaView));
regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(ProductSearchResultsView));
}
5.Creat in application's command binding, we attach it to the application's command binding.
CommandBinding binding = new CommandBinding(
AppCommands.ProductSearchRequestCommand,
ProductSearchRequestCommand_Executed,
ProductSearchRequestCommand_CanExecute);
Application.Current.MainWindow.CommandBindings.Add(binding);
6. Attach the command to screen. In the XAML file.
<Button Content="Search Product"
Command="local:AppCommands.ProductSearchRequestCommand"
VerticalAlignment="Top" Height="23.463">
</Button>
Once you set up the first command. It should be easy to creat the left.
47f72126-baa9-4579-85f8-f9d18a08a8de|0|.0
In the first asp.net mvc with Jquery plugin I implement 3 JQuery plug in
Simple Model: see link http://www.ericmmartin.com/projects/
I implement 3 types of simple model here. Especially for Contact simple model, it need asp.net mvc provide ajax method.
Month Calendar: see link http://www.bytecyclist.com/projects/jmonthcalendar
week calendar: see link http://www.redredred.com.au/new-jquery-weekly-calendar-plugin/
you can download source code from the source code of http://juqerymvc.codeplex.com/ . Once you download, you can open it by visual studio 2008, and then start the fun.
7aee657f-e73a-45d3-8e34-635720fd4c9e|2|5.0
Welcome to my website, My website is basd on .net technology. You will see how I use or learn asp.net mvc architecture and WPF.
I will post a different version of asp.net mvc project in codeplex and help you go through them easily.
2131da68-db81-4759-8bab-9ebe5eaeeaff|1|5.0