小编Sla*_*pen的帖子

如何将一个方法从类中拉出(并转换为新的或现有的)?

使用Visual Studio 2010/Resharper将一个简单的方法从类中拉出来并进入一个新类的最简单方法是什么?

编辑:我使用Resharper版本5.

c# resharper refactoring visual-studio-2010

9
推荐指数
1
解决办法
5521
查看次数

从xaml模板文件获取flowdocument

我有一个像这样开始的Xaml文件:

  <FlowDocument
       x:Name="flowDocument"
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       xmlns:Drawing="clr-namespace:System.Drawing;assembly=System.Drawing"
Run Code Online (Sandbox Code Playgroud)

当前解决方案通过使用flowdocument引用xaml文件的物理路径来使用StremReader,然后将数据解析到模板中.

这不是一个有效的解决方案,因此我需要在没有引用物理路径的情况下获取flowdocument.

我想在我的C#代码中使用xmlns命名空间或类似命令

string result = XamlWriter.Save(flowDocument)
Run Code Online (Sandbox Code Playgroud)

并使用结果进行解析.

建议?

wpf xaml flowdocument

5
推荐指数
1
解决办法
6454
查看次数