本文整理匯總了C#中System.Windows.Controls.UserControl.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# UserControl.ToString方法的具體用法?C# UserControl.ToString怎麽用?C# UserControl.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Controls.UserControl
的用法示例。
在下文中一共展示了UserControl.ToString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: LoadApplication
public UserControl LoadApplication(UserControl requestedApplication)
{
int startIndexOfFullName = requestedApplication.ToString().LastIndexOf('.') + 1;
int lastIndexOfFullName = requestedApplication.ToString().IndexOf('_');
string appTileName = requestedApplication.ToString().Substring(startIndexOfFullName, lastIndexOfFullName - startIndexOfFullName);
foreach (UserControl Apps in AppLauncherControl.AppContent)
{
startIndexOfFullName = Apps.ToString().LastIndexOf('.') + 1;
lastIndexOfFullName = Apps.ToString().IndexOf('_');
string appContentName = Apps.ToString().Substring(startIndexOfFullName, lastIndexOfFullName - startIndexOfFullName);
if (appTileName == appContentName)
{
currentLoadedApplication = Apps;
break;
}
}
return currentLoadedApplication;
}
示例2: creationMenuClicDroitMain
public ContextMenu creationMenuClicDroitMain(UserControl usercontrol)
{
ContextMenu contextMenu = this.creationBaseMenuClicDroit();
if (((App)App.Current).securite.VerificationDroitActionsCRUD(usercontrol.ToString(), "Look"))
{
MenuItem itemAfficher = new MenuItem();
itemAfficher.Header = "Afficher";
itemAfficher.Click += new RoutedEventHandler(delegate { ((App)App.Current)._theMainWindow._CommandLook.Command.Execute(((App)App.Current)._theMainWindow); });
contextMenu.Items.Add(itemAfficher);
}
if (((App)App.Current).securite.VerificationDroitActionsCRUD(usercontrol.ToString(), "Add"))
{
MenuItem itemAfficher = new MenuItem();
itemAfficher.Header = "Ajouter";
itemAfficher.Click += new RoutedEventHandler(delegate { ((App)App.Current)._theMainWindow._CommandAdd.Command.Execute(((App)App.Current)._theMainWindow); });
contextMenu.Items.Add(itemAfficher);
}
if (((App)App.Current).securite.VerificationDroitActionsCRUD(usercontrol.ToString(), "Update"))
{
MenuItem itemAfficher = new MenuItem();
itemAfficher.Header = "Modifier";
itemAfficher.Click += new RoutedEventHandler(delegate { ((App)App.Current)._theMainWindow._CommandUpdate.Command.Execute(((App)App.Current)._theMainWindow); });
contextMenu.Items.Add(itemAfficher);
}
if (((App)App.Current).securite.VerificationDroitActionsCRUD(usercontrol.ToString(), "Remove"))
{
MenuItem itemAfficher = new MenuItem();
itemAfficher.Header = "Supprimer";
itemAfficher.Click += new RoutedEventHandler(delegate { ((App)App.Current)._theMainWindow._CommandDelete.Command.Execute(((App)App.Current)._theMainWindow); });
contextMenu.Items.Add(itemAfficher);
}
return contextMenu;
}