Created
January 12, 2016 16:11
-
-
Save BenjaminAbt/1d88b0ea72a67e7e27bf to your computer and use it in GitHub Desktop.
Bind HeartRate to UWP ViewModel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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