On m'a donné une tâche au travail et en tant que stagiaire tout est nouveau haha. On m'a demandé de faire ce qui suit:Comprendre les actions et UriQuery
//To test this you will need to update the code CoreModuleDesktop.cs.
this.NavManager.RegisterCommonActionItem("History Audit Log", "AuditLog", 110,
new BitmapImage(new Uri("pack://application:,,,/Core;component/Resources/maintenance.png")),
new Action(() => _regionManager.RequestNavigate(RegionNames.MainRegion, typeof(Views.HistoryAuditLogView).FullName)));
//The part inside the action will need to be changed to look something like this
//where you specify the parameters. Then you can pull them out OnNavigateTo method
//like in the ServiceOrderMaintenanceViewModel. For this step just pass in the
//Table and Key ID, leave the connection string hard coded.
IRegionManager regionManager = AllianceApp.Container.GetExportedValue<IRegionManager>();
UriQuery query = new UriQuery();
query.Add("AccountID", accountID.ToString());
query.Add("ServiceOrderID", serviceOrderID.ToString());
regionManager.RequestNavigate(RegionNames.MainRegion, new Uri(typeof(ServiceOrderMaintenanceView).FullName + query.ToString(), UriKind.Relative));
Que font-ils signifie la partie intérieure de l'action? Et comment dans le monde cette requête est-elle fournie? Toute aide serait appréciée!
[UriQuery] (http://msdn.microsoft.com/en-us/library/gg431576 (v = pandp.40) .aspx) est juste une simple classe d'assistance pour générer [des chaînes de requête HTML] (http: //en.wikipedia.org/wiki/Query_string). – Clemens