The WPF bug List (8)--rowdefinition maxheight under certain conditions

Source: Internet
Author: User
Tags xmlns

And the next city.

Bug Description: When RowDefinition's Height property is set to Auto, MaxHeight will not limit the height of this row.

Bug discovery process: Want to do something like the Error List in Visual Studio 2008. Usually automatically occupy the smallest space, you can at the appropriate time to bounce out, but do not play too high.

The sample window code is as follows:

Demo Window

 <window x:class= "Invalimaxheight.demowindow" 
xmlns= http://schemas.microsoft.com/winfx/2006/xaml/ Presentation "
xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "
title=" maxheight of RowDefinition not E FFCT "
windowstartuplocation=" "Centerscreen"
height= "the" "Width="
resizemode= "Noresize"
<grid>
<grid.rowdefinitions>
<rowdefinition/>
<rowdefinition height= "5"/>
<rowdefinition height= "Auto" maxheight= "/>";
</grid.rowdefinitions> ;
<dockpanel margin= "
<textblock dockpanel.dock=" Top "textwrapping=" Wrap "
text= "XXX"/>
<button content= "Show Large tab
click=" Onshowlargeta bclick "
horizontalalignment=" center
verticalalignment= "center" width= "/>";
</dockpanel>
<gridsplitter grid.row= "1" horizontalalignment= "Stretch"/>
<tabcontrol grid.row= "2" margin= "12" & Gt
<tabitem header= "Empty tab"/>
<tabitem header= "Large tab" Name= "Largetab"
<listbox name= "ListBox"/>
</tabitem>
</tabcontrol>
</ Grid>
</window>

Note: The default value for the height of rowdefinition is *.

To avoid unnecessary misunderstandings with unwanted code, the above code minimizes the size of the settings. The margin is set to be beautiful. The results of the operation are shown below.

Figure 1. Startup

Maybe we don't know how big the 50px is, it's probably the height of the part under the Gray line now. This means that the height should not change much after clicking the button. But that's the way it turned out.

Figure 2. Clicked

At this point, if you drag the top of the GridSplitter, then large tab that part will suddenly become smaller.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.