Exemplo n.º 1
0
        /// <inheritdoc/>
        protected override async ValueTask DisposeAsync(bool disposing)
        {
            if (disposing)
            {
                // remove button from parents
                ParentDropdown?.NotifyButtonRemoved(this);
                ParentAddons?.NotifyButtonRemoved(this);

                if (Rendered)
                {
                    var task = JSRunner.DestroyButton(ElementId);

                    try
                    {
                        await task;
                    }
                    catch when(task.IsCanceled)
                    {
                    }
                }

                if (command != null)
                {
                    command.CanExecuteChanged -= OnCanExecuteChanged;
                }

                if (Theme != null)
                {
                    Theme.Changed -= OnThemeChanged;
                }
            }

            await base.DisposeAsync(disposing);
        }
Exemplo n.º 2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                JSRunner.DestroyButton(ElementId);
            }

            base.Dispose(disposing);
        }
Exemplo n.º 3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // remove button from parents
                ParentDropdown?.UnRegister(this);
                ParentAddons?.UnRegister(this);

                JSRunner.DestroyButton(ElementId);
            }

            base.Dispose(disposing);
        }
Exemplo n.º 4
0
        /// <inheritdoc/>
        protected override async ValueTask DisposeAsync(bool disposing)
        {
            if (disposing)
            {
                // remove button from parents
                ParentDropdown?.NotifyButtonRemoved(this);
                ParentAddons?.UnRegister(this);

                if (Rendered)
                {
                    var task = JSRunner.DestroyButton(ElementId);

                    try
                    {
                        await task;
                    }
                    catch when(task.IsCanceled)
                    {
                    }
Exemplo n.º 5
0
        public override void Dispose()
        {
            JSRunner.DestroyButton(ElementId);

            base.Dispose();
        }