private void MetroWindow_ContentRendered(object sender, EventArgs e) { PageAdditional p = (PageAdditional)pageWithButton.Content; if (p == null) { return; } p.OnMessageShow += P_OnMessageShow; }
// it isn't working private async void P_OnMessageShow(object sender, EventArgs e) { var result = await this.ShowInputAsync("Test", "Test message isn't showing"); this.ShowModalMessageExternal("Test", "Message from page was showed"); PageAdditional p = (PageAdditional)pageWithButton.Content; if (p == null) { return; } p.MessageReceived(this, e); }