定义方法: Geometry PathMarkupToGeometry(string pathMarkup) { string xaml = "<Path " + "xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>" + "<Path.Data>" + pathMarkup + "</Path.Data></Path>"; var path = XamlReader.Load(xaml) as Windows.UI.Xaml.Shapes.Path; Geometry geometry = path.Data; path.Data = null; return geometry; } 使用示例: var stringPath = "M 400,600 C 390,575 360,550 400,540 C 440,550 410,575 400,600"; var path = new Windows.UI.Xaml.Shapes.Path() { Fill = new SolidColorBrush(Colors.Red), Data = PathMarkupToGeometry(stringPath) }; myCanvas.Children.Add(path);