/// <summary> /// Pops up the dialog box for the user to add levels. /// </summary> /// <param name="sender"></param> /// <param name="routedEventArgs"></param> private void createlevels_OnClick(object sender, RoutedEventArgs routedEventArgs) { //get the row number and label of the button we clicked var rowNum = Grid.GetRow((sender as FrameworkElement).Parent as UIElement) - 1; //-1: offset for the header row AddFactorLabels afl = new AddFactorLabels(_efViewModel, rowNum); afl.ShowDialog(); }
/// <summary> /// Pops up the dialog box for the user to add levels. /// </summary> /// <param name="sender"></param> /// <param name="routedEventArgs"></param> private void createlevels_OnClick(object sender, RoutedEventArgs routedEventArgs) { //get the row number and label of the button we clicked var rowNum = Grid.GetRow((sender as FrameworkElement).Parent as UIElement) -1; //-1: offset for the header row AddFactorLabels afl = new AddFactorLabels(_efViewModel, rowNum); afl.ShowDialog(); }