locked
ArcSegment Constructor in Window Store App Codebehind RRS feed

  • Question

  • Is there a constructor for the ArcSegment & LineSegment in Silverlight that allows you to specify parameters? I have a Windows Store app in which I need to programmatically create the segments for my PathFigure, but I would rather not need to put every property on a separate line. In the .NET 4.5 documentation at:

    http://msdn.microsoft.com/en-us/library/ms589437(v=vs.110).aspx

    It shows a constructor with parameters, but Visual Studio 2013 won't let me use it. Is it not available for Windows Store apps? Do I need to update Visual Studio? Any help would be appreciated. Thanks.


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Tuesday, December 10, 2013 2:46 AM

Answers

  • The documentation you link is for System.Windows.Media.ArcSegment, which is part of WPF. Windows Store apps do not use WPF or System.Windows. They use the native Windows namespaces for UI rather than the .Net Framework. See .NET for Windows Store apps overview for information about where and how Windows Store apps use the .Net Framework.

    The Windows.UI.Xaml.Media.ArcSegment does not have a constructor which accepts arguments.

    --Rob

    Tuesday, December 10, 2013 3:02 AM
    Moderator

All replies

  • The documentation you link is for System.Windows.Media.ArcSegment, which is part of WPF. Windows Store apps do not use WPF or System.Windows. They use the native Windows namespaces for UI rather than the .Net Framework. See .NET for Windows Store apps overview for information about where and how Windows Store apps use the .Net Framework.

    The Windows.UI.Xaml.Media.ArcSegment does not have a constructor which accepts arguments.

    --Rob

    Tuesday, December 10, 2013 3:02 AM
    Moderator
  • Thank you for pointing that out, I guess I didn't notice the namespace difference before, but it definitely explains a lot. Thanks.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Tuesday, December 10, 2013 5:42 PM