Skip to content

Instantly share code, notes, and snippets.

@BenjaminAbt
Created January 12, 2016 16:11
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 BenjaminAbt/1d88b0ea72a67e7e27bf to your computer and use it in GitHub Desktop.
Save BenjaminAbt/1d88b0ea72a67e7e27bf to your computer and use it in GitHub Desktop.
Bind HeartRate to UWP ViewModel
/// <summary>
/// Receives new heart rate and sets <see cref="HeartRate"/>
/// </summary>
private void OnHeartRate( object sender, EventArgs e )
{
MsBandHeartRateEventArgs args = e as MsBandHeartRateEventArgs;
if( args != null )
{
_uiFactory.StartNew( () =>
{
this.HeartRate = args.HeartRate;
} );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment