public static void RegisterCommand(this IExportCommandBindings container, UIElement ele, ScriptBindingScope scope)
        {
            foreach (var c in container.ExportedCommandBindings)
                if (scope.HasFlag(c.Scope))
                {
                    var binding = c.CommandBinding;
                    if (binding != null)
                        ele.CommandBindings.Add(binding);
                }
        }

Last edited Aug 8, 2014 at 6:29 AM by lycj, version 1

Comments

No comments yet.