当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
运维就业现状怎么样?技能要求高吗?
C#移动OA办公系统源码(基于微信企业号)
使用 Chrome 开发者工具的 lighthouse 功能分析 web 应用的性能问题
EasyUi常用代码
c sqlite...
awk 统计平均 最大 最小值
如果是测试 axi dma抓数的话 看这里
【SQL】触发器同步表数据
致-.-- -..- -
Latex分章节、分段落编译:input{}与include{}的区别
5 g NR notes
Force KouTi (5), the longest text string back
Go学习笔记(篇一)配置Go开发环境
WIN10系统如何开启终端
刷题-洛谷-P1200 你的飞碟在这儿Your Ride Is Here
Zip4j使用
Jmeter - Heap配置原因报错Invalid initial heap size: -Xms1024m -Xmx2048mError
Openharmony code framework (2) the person that
实现菜单拖拽排序
The list of Kubernetes - watch mechanism








