当前位置:网站首页>uwp ScrollViewer content out of panel when set the long width
uwp ScrollViewer content out of panel when set the long width
2022-08-04 19:56:00 【林德熙】
I find a ununderstandable behavior in UWP. I make a content with a long width in ScrollViewer and the content will out of the panel.
I write a xaml with a ScrollViewer and a Grid. And than I set a content to ScrollViewer and the content is a long width Grid.
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<ScrollViewer HorizontalScrollBarVisibility="Visible">
<Grid Width="2100000">
<TextBlock Margin="10,10,10,10"
Text="asdasdasdasdasdasdasdasdasdaasdasdasdasdasdasdasdasdasdasdasdasdasdasdaasdasdasdasdasdasdasdasdasdasdasdasdasdasdaasdasdasdasdasdasdasdasdasdasdasdasdasd" />
</Grid>
</ScrollViewer>
<Grid Grid.Column="1" Background="#aa565656" />
</Grid>Running the code, and the TextBlock will out of the Grid.
After I set the Grid width to 2000000 that work well.
Do not ask why I can find it. I wrote a code await "lindexi is doubi"; and my friend pressed my head to the Keyboard. My head pressed the 0 key and set the Grid width. I ran the code and I was surprised to see it.
Code https://github.com/lindexi/lindexi_gd/tree/550373c7ee587980a7ecd56e2c03aa40c6972416/TucasurchasGeldiskaycasoohou
边栏推荐
猜你喜欢
随机推荐
刷题-洛谷-P1307 数字反转
03 ts类型缩小,函数
linkboy 5.0 正式发布,新增语音识别、图像识别
编译optimize源码实现过程
Elastic Search 根据匹配分和热度分排序
如何让远在的老板看到你!----------来自财富中国网
C#将对象转换为Dictionary字典集合
JSD-2204-酷莎商城(管理员模块)-密码加密-Day10
基于HDF的LED驱动程序开发(2)
Tensorflow2 环境搭建
The difference between Client Side Cache and Server Side Cache
vscode离线安装插件方法
QCustomPlot 坐标轴间隔显示刻度标签
June To -.-- -..- -
Nuxt.js的优缺点和注意事项
MySQL远程备份策略举例
数据安全解决方案的发展
How to manually download and install SAP Fiori tools - Extension Pack for Visual Studio Code
刷题-洛谷-P1304 哥德巴赫猜想
awk 统计平均 最大 最小值









