问题
I am wanting to update some of our TFS work items as users have reported that in the Web Access portal there is a lot of wasted space.
What I mean is when we load a work item, and there is as Description text box (type HtmlFieldControl, refname System.Description) then there appears to be a lot of white space between the control and the bottom of the page. When I open the work item in Visual Studio, then it appears fine and the Description fills up correctly.
Altering the Height property just doesn't seem to change how it renders in a browser.
<TabGroup>
<Tab Label="Description">
<Control FieldName="System.Description" Type="HtmlFieldControl" Label="Des&cription:" LabelPosition="Top" Dock="Fill" Height="500"/>
</Tab>
.... Other tabs here
</TabGroup>
Whilst typing this up I realised it is probably a bit tough to get what I mean, so I've taken a screenshot. I just can't get the Description field to increase in visible height when viewed in a browser.
Hopefully this makes sense.
EDIT: I have found a link where a user is reporting the same problem, unfortunately the idea posted about changing the MinimumSize didn't help that user or me.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d3afca41-a09b-4ccf-bd76-e32145d7fc13/minimumsize-attribute-not-working-with-htmlfieldcontrol-for-tfs-2012?forum=tfsworkitemtracking
回答1:
From what I've been able to determine this now doesn't seem possible in TFS 2012, there appears to be a bug around the resizing of an HTMLFieldControl.
https://connect.microsoft.com/VisualStudio/feedback/details/1148630/issues-with-htmlfieldcontrol-and-tfs-2012-tfs-2013-web-accesss
Description
I have recently upgraded from TFS 2010 to TFS 2012.4 and have noticed some issues with the HTMLFieldControl and TWA 2012. 1.The MinimumSize attribute does not work in Team Web Access. It defaults to a specific size (250 pixels).
Response
Thank you reporting the issue. The problem with MinSize will be fixed in the TFS 2015.
I won't accept this immediately as I hope there is an alternative solution, but there seems to be no other option to resolve my issue.
回答2:
You need to use "Minimumsize" like following:
<Control FieldName="System.Description" Type="HtmlFieldControl" LabelPosition="Top" Dock="Fill" MinimumSize="(0,700)" />
And I recommend you to use TFS Power Tools to edit the work item definitions as you can preview the changes with it.
来源:https://stackoverflow.com/questions/35206689/work-item-description-height-not-increasing