开发者

One pixel line in silverlight application

I want to draw one pixel line in my silverlight (4.0) application.

I use next wpf code:

<Canvas  Name="CanvasRoot" Height="4000">
                <Line X1="0" Y1="10" X2="100" Y2="10" Width="100" Height="100" StrokeThickness="1" Stroke="Aqua" Fill="#FF903F3F"></Line> 
            </Canvas>

but it does not allow me to create real one pixel line. I mean here line which has one pixel weight when I rotate it. I tried to set StrokeThickness to 0.5, but it did not help me. Suggest me please how to do it.

Thank开发者_如何学运维 you


Rectangle with 1px height should do the trick.

<Rectangle Height="1" Canvas.Top="10" Width="100" Fill="#FF903F3F" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜