public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			aButton.TouchUpInside += (sender, e) => {
				if (InitialActionCompleted != null){
					aButton.Hidden = true;
					InitialActionCompleted.Invoke (this, new EventArgs ());
			Title = "Xamarin Chat";

			// You must set your senderId and display name
			SenderId = sender.Id;
			SenderDisplayName = sender.DisplayName;

			// These MessagesBubbleImages will be used in the GetMessageBubbleImageData override
			var bubbleFactory = new MessagesBubbleImageFactory ();
			outgoingBubbleImageData = bubbleFactory.CreateOutgoingMessagesBubbleImage (UIColorExtensions.MessageBubbleLightGrayColor);
			incomingBubbleImageData = bubbleFactory.CreateIncomingMessagesBubbleImage (UIColorExtensions.MessageBubbleBlueColor);

			// Remove the AccessoryButton as we will not be sending pics
			InputToolbar.ContentView.LeftBarButtonItem = null;

			// Remove the Avatars
			CollectionView.CollectionViewLayout.IncomingAvatarViewSize = CoreGraphics.CGSize.Empty;
			CollectionView.CollectionViewLayout.OutgoingAvatarViewSize = CoreGraphics.CGSize.Empty;

			// Load some messagees to start
			messages.Add (new Message (sender.Id, sender.DisplayName, NSDate.DistantPast, "Hi There"));
			messages.Add (new Message (friend.Id, friend.DisplayName, NSDate.DistantPast, "I'm sorry, my responses are limited. You must ask the right questions."));
		}
示例#2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            aButton.TouchUpInside += (sender, e) => {
                if (InitialActionCompleted != null)
                {
                    aButton.Hidden = true;
                    InitialActionCompleted.Invoke(this, new EventArgs());
                }
            };
        }