public void RegisterCustomActionDelegate(CustomActionDelegate custActDelegate) { if (!registeredCustActDelegates.Contains(custActDelegate)) { registeredCustActDelegates.Add(custActDelegate); } }
public void UnregisterCustomActionDelegate(CustomActionDelegate custActDelegate) { if (registeredCustActDelegates.Contains(custActDelegate)) { registeredCustActDelegates.Remove(custActDelegate); } }
public Example() { InitializeComponent(); pvLesson2.Loaded += new RoutedEventHandler(pvLesson2_Loaded); pvLesson2.ItemActionExecuted += new EventHandler <ItemActionEventArgs>(pvLesson2_ItemActionExecuted); sample1Delegate = new CustomActionDelegate(CreateSample1CustomAction); sample2Delegate = new CustomActionDelegate(CreateSample2CustomAction); DataContext = _viewModel; }