Enterwell / Wpf.Notifications

WPF notifications UI controls (as seen in VS Code)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

notification dont close after click

ghost1372 opened this issue · comments

hi i want after user clicked on button notification close but dont work can you help?

var builder = this.Manager
                 .CreateMessage()
                .Accent(AppVariable.RED)
                .Background(AppVariable.BGBLACK)
                .HasBadge("هشدار")
                .HasHeader(string.Format("آیا برای حذف {1} {0} اطمینان دارید؟", SchoolName, Type))
                .WithButton("بله", button =>
                {
                switch (Type)
                {
                    case "مدرسه":
                        //AddSchool.main.tabc.SelectedIndex = 0;
                        break;

                    case "دانش آموز":
                        AddStudent.main.deleteStudent();
                        break;
                    case "کاربر":
                        //AddStudent.main.tabc.SelectedIndex = 0;
                        break;
                }
                })
                .Dismiss().WithButton("خیر", button => { });
           builder.Queue();

when i click on "بله" button after doing some work notification dont close automaticly

If you want to dismiss the message on button click you need to call .Dismiss() before .WithButton().

In your case, you're missing .Dismiss() on the بله button, you only have it on خیر.

oh yes tnx