EllipseGeometry is not rendering in Silverlight
I'm trying to draw a circle in WP7 Silverlight using EllipseGeometry instead of Ellipse. The sample XAML in MSDN does not display anything on the canvas in Visual Studio. If I run the app, it does display in the emulator.
<Canvas> <Path Fill="Gold" Stroke="Black" StrokeThickness="1"> <Path.Data> <EllipseGeometry Center="50,50" RadiusX="50" RadiusY="50" /> </Path.Data> </Path> </Canvas> Any ideas what is happening?
Answers & Comments...
Answer: 1
Answer: 1
For some unclear reasons, you should assign Width and Height.
<Canvas> <Path Width="100" Height="100" Fill="Gold" Stroke="Black" StrokeThickness="1"> <Path.Data> <EllipseGeometry Center="50,50" RadiusX="50" RadiusY="50" /> </Path.Data> </Path> </Canvas> In blend, you will not have this issue.
by : Cybermaxshttp://stackoverflow.com/users/1554201
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog