当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Chrome安装zotero connector 插件
idea源码无法下载
程序员如何在职场上少走弯路?
用“绿色计算“技术推动算力可持续发展
MYSQL获取数据库的表名和表注释
Client Side Cache 和 Server Side Cache 的区别
Seata source code analysis: various message processing processes of seata server
vehemently condemn
蚂蚁集团时序数据库CeresDB正式开源
小软件大作用 | 如何省时省力进行Gerber图层快速对比?
【AGC】构建服务1-云函数示例
【Attention 演变史】RNN的产生、架构、推广、问题(第一弹)
二叉树的遍历
取证程序分类
vscode离线安装插件方法
PostgreSQL的 SPI_接口函数
nr部分计算
前3名突然变了,揭秘 7 月编程语言最新排行榜
Initialization process of SAP UI5
MYSQL gets the table name and table comment of the database