public Platform() { _renderer = new PlatformRenderer(this); _renderer.Style.PropertyChanged += HandleRendererStyle_PropertyChanged; MessagingCenter.Subscribe(this, Page.AlertSignalName, (Page sender, AlertArguments arguments) => { var alert = new DisplayAlert(arguments); alert.Clicked += CloseAlert; _renderer.AppendChild(alert.Element); void CloseAlert(object s, EventArgs e) { _renderer.RemoveChild(alert.Element); } }); MessagingCenter.Subscribe(this, Page.ActionSheetSignalName, (Page sender, ActionSheetArguments arguments) => { var sheet = new ActionSheet(arguments); sheet.Clicked += CloseSheet; _renderer.AppendChild(sheet.Element); void CloseSheet(object s, EventArgs e) { _renderer.RemoveChild(sheet.Element); } }); }
public Platform() { _renderer = new PlatformRenderer(this); MessagingCenter.Subscribe(this, Page.AlertSignalName, (Page sender, AlertArguments arguments) => { var alert = new DisplayAlert(arguments); alert.Clicked += CloseAlert; _renderer.AppendChild(alert.Element); void CloseAlert(object s, EventArgs e) { _renderer.RemoveChild(alert.Element); } }); }