I have content for a ItemTemplate
for a ItemsControl
Once I specify a minwath
, then the set is cut, which is in the width of the container in the larger width compared to the width
but otherwise there is no clipping is.
The following image is set to the MinWayed
100, container's width
is left out as little as "test " can be seen being cut.
& lt; Time: TimeControl.ItemTemplate & gt; & Lt; DataTimePlatDataType = "Activity: Mapping Work Entry Overview" & gt; & Lt; Button MinWidth = "100" Content = "Test" /> & Lt; / DataTemplate & gt; & Lt; / Time: TimeControl.ItemTemplate & gt;
My item comes from container ContentControl
and the following template applies:
& gt; Style Target Type = "{x: Type Control: TimeControl}" & gt; & Lt; Setter Estates = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "{x: Type Control: TimeControl}" & gt; & Lt; Content Viewer / & gt; & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt;
What is the reason for this behavior, and how can I guarantee that the content has not been cut, but the minimum requested width has been obtained?
I believe your problem is the cause because your TextBlock
Text ( Content
) is giving your minimum width, but it is not visible because it is centered and your parent control is not giving the desired width, try it:
& lt; DataTimePlatDataType = "activityVm: WorkinWeelViewMailModel" & gt; & Lt; Button MinWidth = "100" horizontal content alignment = "left" content = "test" /> & Lt; / DataTemplate & gt;
No comments:
Post a Comment