Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created December 14, 2017 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juucustodio/b3bf4b7e04a52bfdd1ee59cbbb5bbb75 to your computer and use it in GitHub Desktop.
Save juucustodio/b3bf4b7e04a52bfdd1ee59cbbb5bbb75 to your computer and use it in GitHub Desktop.
Example of Chat in Xamarin.Forms applications - http://julianocustodio.com/chat
using System;
using MvvmHelpers;
namespace DemoChat.Models
{
public class Message : ObservableObject
{
public string Text
{
get { return _text; }
set { SetProperty(ref _text, value); }
}
string _text;
public DateTime MessageDateTime
{
get { return _messageDateTime; }
set { SetProperty(ref _messageDateTime, value); }
}
DateTime _messageDateTime;
public string TimeDisplay => MessageDateTime.ToLocalTime().ToString();
public bool IsTextIn
{
get { return _isTextIn; }
set { SetProperty(ref _isTextIn, value); }
}
bool _isTextIn;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment