// DEl Sqrt X^2 1/X private void Expandfun_Click(object sender, RoutedEventArgs e) { if (sender == delButton) { if (resultLable.Content.ToString().Length != 1) { resultLable.Content = resultLable.Content.ToString(). Substring(0, resultLable.Content.ToString().Length - 1); } else { resultLable.Content = "0"; } } if (sender == sqrtButton) { if (double.TryParse(resultLable.Content.ToString(), out lastValue)) { lastValue = Math.Sqrt(lastValue); resultLable.Content = lastValue.ToString(); } } if (sender == powButton) { if (double.TryParse(resultLable.Content.ToString(), out lastValue)) { lastValue = SimpleMath.pow(lastValue); resultLable.Content = lastValue.ToString(); } } if (sender == revButton) { if (double.TryParse(resultLable.Content.ToString(), out lastValue)) { lastValue = SimpleMath.rev(lastValue); resultLable.Content = lastValue.ToString(); } } }