c# - 自动将内容大小调整为窗口大小
问题描述
我希望当我更改窗口大小时,我的内容将按照默认大小放置,只有它自己调整大小
<Window =Height="500"
Width="800"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<TextBlock
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Name="consoleOutput"
Margin="170,10,10,140"
Background="Aqua"/>
<TextBlock
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Name="menuOutput"
Margin="10,10,630,245"
Background="Gray"/>
<TextBlock
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Name="menuOutput2"
Margin="10,245,630,10"
Background="Green"/>
<TextBox
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Name="consoleInput"
Margin="170,340,10,10"
Background="Red"
AcceptsReturn="True"/>
</Grid>
</Window>
解决方案
推荐阅读
- java - WildFly 中的客户端 IP 和请求 URL 列表
- php - MYSQL:仅返回与两个没有冲突的表匹配
- c# - Linq.Select() 中的多个返回语句有什么作用?
- java - Getter 和 setter 不能正常工作
- java - 如何在不创建额外的 WUF 对象或使用复杂度 >= O(n) 的方法的情况下处理渗滤中的反冲洗问题?
- python - Python 请求:无权访问 URL 和 unicode 错误
- java - Cloud Foundry 应用停止时如何显示自定义错误页面?
- javascript - Firebase 查询每次返回不同的结果
- sql - 在 SQL 中将记录计数行添加到查询结果的顶部
- json - 如何在pyspark的json数据中按键切片字典?