public void Stat_Add_Button_Click(object sender, RoutedEventArgs e) { string text = _mainPage.GetMainText(); // get the text block TextBlock tb = new TextBlock(); tb.Text = text; tb.FontSize = 60; tb.Foreground = Utilities.Helpers.GetBrush(Utilities.Helpers.Colors.DarkGray); tb.FontFamily = new Windows.UI.Xaml.Media.FontFamily("Segoe UI Light"); tb.FontWeight = Windows.UI.Text.FontWeights.Light; Viewbox vb = new Viewbox(); vb.Height = TemplateStatButtonHeight.ActualHeight; vb.Child = tb; vb.Margin = new Thickness(0, 0, 20, 0); AddToGrid(vb, text); _mainPage.Stat_Add_Button_Click(_currentStatValues.Count.ToString()); // reset the equals key focus when we change view CalcHelpers.equalsKeyFocus(_mainPage.currentView.GetEqualsKey()); }
public void Stat_Add_Button_Click(object sender, RoutedEventArgs e) { string text = _mainPage.GetMainText(); // get the text block TextBlock tb = new TextBlock(); tb.Text = text; tb.FontSize = 60; Viewbox vb = new Viewbox(); vb.Height = TemplateStatButtonHeight.ActualHeight; vb.Child = tb; AddToGrid(vb, text); _mainPage.Stat_Add_Button_Click(_currentStatValues.Count.ToString()); // reset the equals key focus when we change view CalcHelpers.equalsKeyFocus(_mainPage.currentView.GetEqualsKey()); }