[英]WPF: Creating dynamic progress indicator
I'm currently trying to write an application with a progress indicator in C# using WPF: 我目前正在尝试使用WPF在C#中编写带有进度指示器的应用程序:
<Path Canvas.Left="15" Canvas.Top="50" Stroke="Red" StrokeThickness="6" Data=" M 700,100 L 620,100 C 620,100 600,100 600,80 L 600,50 C 600,50 600,30 580,30 L 50,30 L 50,340 L 580,340 C 580,340 600,340 600,320 L 600,290 C 600,290 600,270 620,270 L 700,270" Name="Progress" StrokeDashCap="Flat" StrokeEndLineCap="Round" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeMiterLimit="30">
http://img839.imageshack.us/my.php?image=20100831180406.png http://img839.imageshack.us/my.php?image=20100831180406.png
So far the indicator is finished. 至此指示器已完成。 However I don't have any possibility to lower the length of the indicator yet. 但是我还没有降低指标长度的可能性。 I could redraw the indicator using other coordinates but that would be kind of complicated (think about the rounded parts). 我可以使用其他坐标重绘该指标,但这有点复杂(想想圆角部分)。 Also I can't overlay it with white color as it must be transparent due to a background image. 我也不能用白色覆盖它,因为由于背景图像,它必须是透明的。
Does anyone have an idea on how to achieve what I want? 有人对实现我想要的东西有想法吗? Or point me to another possible solution? 或为我指出另一种可能的解决方案?
Best greetings, Jonas 最好的问候,乔纳斯
I dunno if I'm understanding what you want, but this is what I'd try 如果我了解您想要什么,我不知道,但这就是我会尝试的
This approach would only fill the progress up the "neck" of the bottle-like indicator you made. 这种方法只会填补您制作的瓶状指示器“瓶颈”上的进度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.