public static void UnregisterCommandsRecursive(FrameworkElement obj) { var pnl = obj as Panel; if (pnl != null) { foreach (var item in pnl.Children) { UnregisterCommandsRecursive(item as FrameworkElement); } } CommandSubscription.UnregisterAllSubscriptions(obj); }
public static void UnregisterCommands(FrameworkElement obj) { CommandSubscription.UnregisterAllSubscriptions(obj); }