BaconographyWP8.View.ReplyViewPage.TextBox_SelectionChanged C# (CSharp) Method

TextBox_SelectionChanged() private method

private TextBox_SelectionChanged ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void
		private void TextBox_SelectionChanged(object sender, RoutedEventArgs e)
		{
			var textbox = sender as TextBox;
			if (textbox != null)
			{
				var vm = this.DataContext as ReplyViewModel;
				if (vm != null)
				{
					if (vm.SelectionLength != textbox.SelectionLength)
						vm.SelectionLength = textbox.SelectionLength;
					if (vm.SelectionStart != textbox.SelectionStart)
						vm.SelectionStart = textbox.SelectionStart;
				}
			}
		}