我使用ViewBox控件在winstore应用程序中缩放我的表单。我需要ViewBox中的stretch控件,但常见的HorizontalAlignment="Stretch“不起作用
这是我的代码:
<Viewbox Margin="20" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Top" >
...这是结果:

ViewBox是灰色矩形,选择了网格(蓝色矩形),TextBoxes没有设置宽度。
你能给我提个建议,怎么解决这个问题吗?我不想显式地设置宽度。
发布于 2015-02-27 22:42:20
尝试将Stretch属性设置为Fill (msdn
<Viewbox Margin="20" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch"
Stretch="Fill">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Top">https://stackoverflow.com/questions/28767435
复制相似问题