Inheritance: Xamarin.Forms.ContentPage
コード例 #1
0
		protected override void OnElementChanged (VisualElementChangedEventArgs e)
		{
			base.OnElementChanged (e);
			page = (GroupChatPage)e.NewElement;
		}
コード例 #2
0
		private void OnMessageReceived(object sender, MessageEventArgs messageEventArgs)
		{
			var message = messageEventArgs.Message;
			if (message.NotificationType == NotificationTypes.GroupCreate ||
				message.NotificationType == NotificationTypes.GroupUpdate)
			{
				if (message.AddedOccupantsIds.Any())
				{
					groupManager.MessageReceived -= OnMessageReceived;

					Device.BeginInvokeOnMainThread(() =>
					{
						var groupChantPage = new GroupChatPage(message.ChatDialogId);
						App.Navigation.InsertPageBefore(groupChantPage,
							(App.Current.MainPage as NavigationPage).CurrentPage);
						App.Navigation.PopAsync();
					});
				}
			}
		}