本文整理汇总了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;
}