使 XAML 路径适合视图 [英] Fit XAML path into view

查看:19
本文介绍了使 XAML 路径适合视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下路径.数据来自某个数据文件:

I have the following path. The data is from some data file:

<代码><路径StrokeThickness = 5" 中风= 黑" 填充= 黄色" 数据=M 30330.8847248349,-37724.909002528大号28556.3829935257,-37596.5557453925 28031.7660050946,-38008.0608378072 27746.4689258268,-38895.6687979239 27655.7148993139,-39397.1764657993 27718.5888966473,-39755.4955438608 27628.0246979519,-40621.440862981 28514.7500540091,-41208.8847446069 29093.8320242864,-40459.5872073251 29768.3831435369,-40107.7166927063 30092.4525793664,-39483.6045857995 30784.2658266352,-38627.7070622611 30811.846313938,-38537.1499823241 30358.6906348136,-37734.2759127391 30330.8847248349,-37724.909002528"/>

我想知道这是什么样子,所以我想在 Kaxaml 或 XamlPad 中渲染它.是否有一种简单的方法可以调整此路径的大小,使其以屏幕为中心很好地呈现?

I like to know what this looks like, so I want to render it in Kaxaml or XamlPad. Is there an easy way to resize this path so it will render nicely centered on the screen?

推荐答案

只要将路径的stretch属性设置为Uniform就可以保持apsect ratio,你应该可以在KaXaml中看到它

Just set the path's stretch attribute to Uniform to maitain the apsect ratio and you should be able to see it in KaXaml

<代码><路径弹力= 统一" StrokeThickness = 5" 中风= 黑" 填充= 黄色" 数据=M 30330.8847248349,-37724.909002528大号28556.3829935257,-37596.5557453925 28031.7660050946,-38008.0608378072 27746.4689258268,-38895.668797923927655.7148993139,-39397.1764657993 27718.5888966473,-39755.4955438608 27628.0246979519,-40621.440862981 28514.7500540091,-41208.8847446069 29093.8320242864,-40459.5872073251 29768.3831435369,-40107.7166927063 30092.4525793664,-39483.6045857995 30784.2658266352,-38627.7070622611 30811.846313938,-38537.1499823241 30358.6906348136,-37734.2759127391 30330.8847248349,-37724.909002528"/>

这篇关于使 XAML 路径适合视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆