Zetbox.Client.Presentables.ValueInputTaskViewModel.AddButton C# (CSharp) Method

AddButton() public method

public AddButton ( string label, string tooltip, object>.Action callback ) : void
label string
tooltip string
callback object>.Action
return void
        public void AddButton(string label, string tooltip, Action<Dictionary<object, object>> callback)
        {
            var cmd = ViewModelFactory
                        .CreateViewModel<SimpleCommandViewModel.Factory>()
                        .Invoke(
                            DataContext,
                            this,
                            label,
                            tooltip,
                            () =>
                            {
                                callback(ExtractValues());
                                Show = false;
                            },
                            null,
                            null);
            Commands.Insert(0, cmd);
        }