void CreateBanner(EvasObject parent, Box box) { var banner = new MBanner(parent) { Action = "action", Text = "One line text string with one action." }; banner.Dismissed += (s, e) => { Console.WriteLine($"MBanner is dismissed !!!"); }; banner.ActionClicked += (s, e) => { banner.Unrealize(); Console.WriteLine($"MBanner.ActionButton is clicked!!!"); }; banner.Show(); box.PackStart(banner); }
void CreateBanner3(EvasObject parent, Box box) { var banner = new MBanner(parent) { Action = "action", Cancel = "dismiss", Text = "Two line text string with two actions. One to two lines is perferable on mobile and tablet." }; banner.Dismissed += (s, e) => { Console.WriteLine($"MBanner is dismissed !!!"); }; banner.ActionClicked += (s, e) => { Console.WriteLine($"MBanner.ActionButton is clicked!!!"); }; banner.Show(); box.PackStart(banner); }
void CreateBanner4(EvasObject parent, Box box) { var banner = new MBanner(parent) { Action = "action", Cancel = "dismiss", Icon = Path.Combine(ThemeLoader.AppResourcePath, "image.png"), Text = "Two line text string with two actions. One to two lines is perferable on mobile and tablet." }; banner.Dismissed += (s, e) => { Console.WriteLine($"MBanner is dismissed !!!"); }; banner.ActionClicked += (s, e) => { Console.WriteLine($"MBanner.ActionButton is clicked: [Action] Change Icon"); banner.Icon = Path.Combine(ThemeLoader.AppResourcePath, "copy.png"); }; banner.Show(); box.PackStart(banner); }