WizardPagePresenter Height related to previous page problem

Wizard for WPF Forum

Posted 13 years ago by Greg Shaffer
Version: 10.2.0532
Avatar
When I resize my wizard, the content in the WizardPagePresenter is somehow tied to size of the content from the previous page... which causes my scrollbars to not adjust properly.

I have created a sample project that demonstrates this behavior.

Steps to reproduce:
1) Click "Next" two times, until you get to the page titled "Table Page Two"
2) Make the height of the Wizard shorter by grabbing the bottom of the dialog and dragging up
3) Notice that the bottom of the scrollbar that appears on the table is obscured.

What is strange is if I resize when "Table Page One" is visible, then "Table Page Two" will resize up to that same height. This makes me think that the WizardPagePresenter's height is somehow using the height of the largest control.

Please Advise.

Thanks,
Greg

<Window x:Class="WizardSizeProblem.WizardWindow1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared"
    xmlns:wizard="http://schemas.actiprosoftware.com/winfx/xaml/wizard"
    Width="600" MinHeight="450" SizeToContent="Height" ResizeMode="CanResize"
    >
    
    <wizard:Wizard x:Name="wizard" WindowTitleBehavior="PageTitle" WindowTitleBaseText="Wizard QuickStart" PageSequenceType="Stack">
        <wizard:Wizard.TransitionSelector>
            <shared:MultiTransitionSelector>
                <!-- This adds a single bar wipe transition -->
                <shared:BarWipeTransition />
            </shared:MultiTransitionSelector>
        </wizard:Wizard.TransitionSelector>
        
        <wizard:WizardPage x:Name="welcomePage" PageType="Exterior"
                Caption="Welcome to the My Wizard"
                Description="Enter a description of your wizard here.">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <TextBlock Grid.Row="1" TextWrapping="Wrap">To continue, click Next.</TextBlock>
            </Grid>
        </wizard:WizardPage>
        
        <wizard:WizardPage x:Name="tablePage1" 
                Caption="Table Page One"
                Description="This is a sample interior page that represents a step in your wizard." 
                Title="Interior Page">
            <DataGrid
                VerticalAlignment="Stretch"
                ItemsSource="{Binding Path=NodesTableOne}"
                HorizontalScrollBarVisibility="Hidden" SelectionMode="Single"
                CanUserAddRows="False" CanUserDeleteRows="False"
                CanUserResizeRows="False" CanUserSortColumns="True"
                RowHeaderWidth="17" RowHeight="25" 
                SelectionUnit="Cell"
                />
        </wizard:WizardPage>

        <wizard:WizardPage x:Name="tablePage2" 
                Caption="Table Page Two"
                Description="This is a sample interior page that represents a step in your wizard." 
                Title="Interior Page">
            <DataGrid
                VerticalAlignment="Stretch"
                ItemsSource="{Binding Path=NodesTableTwo}"
                HorizontalScrollBarVisibility="Hidden" SelectionMode="Single"
                CanUserAddRows="False" CanUserDeleteRows="False"
                CanUserResizeRows="False" CanUserSortColumns="True"
                RowHeaderWidth="17" RowHeight="25" 
                SelectionUnit="Cell"
                />
        </wizard:WizardPage>

    </wizard:Wizard>
    
</Window>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WizardSizeProblem
{
    public class WizardWindow1ViewModel
    {
        public WizardWindow1ViewModel()
        {
            for (int i = 0; i < 20; i++) {
                NodesTableOne.Add(new TestObject(i.ToString()));
            }

            for (int i = 0; i < 18; i++) {
                NodesTableTwo.Add(new TestObject(i.ToString()));
            }
        }

        private List<TestObject> nodesTableOne;
        public List<TestObject> NodesTableOne
        {
            get
            {
                if (nodesTableOne == null)
                    nodesTableOne = new List<TestObject>();
                return nodesTableOne;
            }
        }

        private List<TestObject> nodesTableTwo;
        public List<TestObject> NodesTableTwo
        {
            get
            {
                if (nodesTableTwo == null)
                    nodesTableTwo = new List<TestObject>();
                return nodesTableTwo;
            }
        }
    }

    public class TestObject {
        public TestObject(string name)
        {
            this.Name = name;
        }

        public String Name { get; set; }
    }
}

[Modified at 12/10/2010 04:17 PM]

[Modified at 12/10/2010 04:19 PM]

Comments (3)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Greg,

Thanks for reporting this, we've fixed it for the next version.


Actipro Software Support

Posted 13 years ago by Greg Shaffer
Avatar
Hi,

Thanks for fixing this. When might this next build be available?

Thanks,
Greg
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Greg,

We hope to have it out in late Jan or early Feb.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.