// internal Notification(NotifyType notifyType, NotifyOut notifyOutType, int initialWidth) { SetStyle(ControlStyles.SupportsTransparentBackColor, true); DoubleBuffered = true; this.Width = initialWidth; // _notifyType = notifyType; _outType = notifyOutType; InitAnimation(); }
public TabView() { Page NotifyInPage, NotifyOutPage = null; switch (Device.RuntimePlatform) { case Device.iOS: NotifyInPage = new NavigationPage(new NotifyIn()) { Title = "Demand" }; NotifyOutPage = new NavigationPage(new NotifyOut()) { Title = "Reply" }; //itemsPage.Icon = "tab_feed.png"; //aboutPage.Icon = "tab_about.png"; break; default: NotifyInPage = new NotifyIn() { Title = "Demand" }; NotifyOutPage = new NotifyOut() { Title = "Reply" }; break; } Children.Add(NotifyInPage); Children.Add(NotifyOutPage); Title = Children[0].Title; }
public static void Notify(Form host, string title, string message, NotifyType notifyType, NotifyOut outType = NotifyOut.Automatically, int initialWidth = 300) { var notify = new Notification(notifyType, outType, initialWidth) { Title = title, Text = message, Top = 10, Left = host.Width }; host.Controls.Add(notify); notify.BringToFront(); notify.OnCompeleted = () => { host.Controls.Remove(notify); }; notify.Start(); }