public void OnPreviousButtonClick() { MWindow.Next.IsEnabled = true; MWindow.Final.IsEnabled = true; DrawObj.StepNumber = stepNumber - 1; DrawObj.DrawPrevious(stepNumber); stepNumber--; if (stepNumber == 0) { MWindow.Previous.IsEnabled = false; MWindow.Initial.IsEnabled = false; } MWindow.TextBoxStepNumber.Text = stepNumber.ToString(); }