当前位置:网站首页>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
边栏推荐
猜你喜欢

「 WAIC 2022 · 黑客马拉松」蚂蚁财富两大赛题邀你来战!

高效目标检测:动态候选较大程度提升检测精度(附论文下载)

SQL Server 遇到报错解决办法--更新中

How to promote the implementation of rural revitalization

How to monitor code cyclomatic complexity by refactoring indicators

实现菜单拖拽排序

从卖产品到卖“链路”:20条策略 解读直播带货迭代玩法

Highlights of some performance tests

电脑一键重装系统内存完整性无法打开怎么办

动态数组底层是如何实现的
随机推荐
六月 致 -.-- -..- -
MYSQL gets the table name and table comment of the database
really time ntp service start command
web 应用开发最佳实践之一:避免大型、复杂的布局和布局抖动
刷题-洛谷-P1304 哥德巴赫猜想
Ant Group's time series database CeresDB is officially open source
C#移动OA办公系统源码(基于微信企业号)
【AGC】构建服务1-云函数示例
Go study notes (Part 1) Configuring the Go development environment
AWS SES 的监控和告警
LED的C语言应用程序
力扣题(5)—— 最长回文子串
JSD-2204-酷莎商城(管理员模块)-密码加密-Day10
ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators
JS new一个构造器发生了什么?从零手写一个new方法
jMeter Thread group 对应的 constant timer
如何手动下载并安装 Visual Studio Code 的 SAP Fiori tools - Extension Pack
How to promote the implementation of rural revitalization
蚂蚁集团时序数据库CeresDB正式开源
刷题-洛谷-P1200 你的飞碟在这儿Your Ride Is Here