Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
837 B
4
Indexable
private void UpArrowButton_Click(object sender, RoutedEventArgs e)
{
    if (secondRowContent.Visibility == Visibility.Collapsed)
    {
        // Show the second row and collapse the first row
        secondRowContent.Visibility = Visibility.Visible;
        firstRowContent.Visibility = Visibility.Collapsed;
        secondRow.Height = new GridLength(1, GridUnitType.Star); // Expand the second row
        firstRow.Height = new GridLength(0); // Collapse the first row
    }
    else
    {
        // Show the first row and collapse the second row
        firstRowContent.Visibility = Visibility.Visible;
        secondRowContent.Visibility = Visibility.Collapsed;
        firstRow.Height = new GridLength(1, GridUnitType.Star); // Expand the first row
        secondRow.Height = new GridLength(0); // Collapse the second row
    }
}