FizVizController/FizVizController/Views/ViewUtility.cs
/// <summary>
/// Given a textbox, attempt to parse out and return an int.
/// If parse fails, set the textbox border to red and return null.
/// </summary>
/// <param name="textBox"></param>
/// <returns></returns>
Given a textbox, attempt to parse out and return an int.
If parse fails, set the textbox border to red and return null.
Given a textbox attempt to parse out and return an int . If parse fails set the textbox border to red and return null .
public static int? GetInt(TextBox textBox)
        {
            int value;
            if (int.TryParse(textBox.Text, out value)) return value;
            textBox.BorderBrush = new Windows.UI.Xaml.Media.SolidColorBrush(Colors.Red);
            return null;
        }
public static int ? GetInt ( TextBox textBox ) { int value ; if ( int . TryParse ( textBox . Text , out value ) ) return value ; textBox . BorderBrush = new Windows . UI . Xaml . Media . SolidColorBrush ( Colors . Red ) ; return null ; }
Given a textbox, attempt to parse out and return an int.
Given a textbox attempt to parse out and return an int .
None
textBox
TextBox
None