Claudio
Claudio

Reputation: 2037

TabItems with same size

I'm using tabitems for separating some information but as each one has different information, each one has a different size. I wonder how I could make both have the same size just changing the XAML file.

Basically, the code I did is:

 <WrapPanel>
            <DockPanel LastChildFill="False">
                <TextBlock HorizontalAlignment="Left" DockPanel.Dock="Top" Text="Client Name" />
                <TextBox MinWidth="100"  HorizontalAlignment="Left" DockPanel.Dock="Top" Text="{Binding Path=ClientName, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True,NotifyOnValidationError=True}" MaxWidth="200" />
                <TextBlock HorizontalAlignment="Left" DockPanel.Dock="Top" Text="Date" />
                <TextBox  MinWidth="100"  HorizontalAlignment="Left" DockPanel.Dock="Top" Text="{Binding Path=ClientDate, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True,NotifyOnValidationError=True}" MaxWidth="200" />
                <TabControl DockPanel.Dock="Top">

                    <TabItem ..>
                    </TabItem>

                    <TabItem ..>
                    </TabItem>

                </TabControl>
                <WrapPanel>
                    <Button ../>
                    <Button ../>
                </WrapPanel>
            </DockPanel>
        </WrapPanel>

Regards
Claudio

Upvotes: 0

Views: 1882

Answers (1)

biju
biju

Reputation: 18000

Check Let WPF Tabcontrol height assume height of largest item?

Comment here if it doesn't help

Upvotes: 1

Related Questions