English 中文(简体)
在一个固定文件(Flow)中储存的视力压在时间控制的情况
原标题:Snapshots of Control in time using VisualBrush stored in one Fixed(Flow)Document

我需要及时抽取控制,并储存在一个固定文件中。 问题是,视力巴rush是某种“la”,并不通过在文件上加进来加以评价。 当我最后制作文件时,所有页页都包含同样的(最后的)控制状态。 虽然目光大无法解冻,但是否有任何其他机会这样做? 我要在一页上作更多的简要描述,这样一页就会给我带来一页的墨迹。 Aswel将视力贝压转换为比特图(我希望保持其病媒)。 简言之,I需要一些how(冻结) 视像带

for(;;)
{
    FixedPage page = new FixedPage();
    ...
    Rectangle rec = new Rectangle();
    ...
    rec.Fill = vb;
    page.Children.Add(rec);
    PageContent content = new PageContent();
    ((IAddChild)content).AddChild(page);
    doc.Pages.Add(content);
}
最佳回答

我使用了序列号:

string svb = XamlWriter.Save(vb.CloneCurrentValue());
// Replace all "Name" attributes (I don t need them already and deserialization would crash on them) with "Tag" - not best practice but it s fast :)
svb = svb.Replace("Name", "Tag");
rect.Fill((VisualBrush)XamlReader.Parse(svb));

http://www.ohchr.org。

更好的办法是节省视力,作为XPS文件,然后取回视觉。 (De) 宇宙化与共有集体团体和许多其他“参照”事项有一些问题。

XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(doc);
control.InvalidateArrange();
UpdateLayout();
writer.Write(control);
Visual capture = doc.GetFixedDocumentSequence().DocumentPaginator.GetPage(0).Visual;
问题回答

暂无回答




相关问题
WPF convert 2d mouse click into 3d space

I have several geometry meshes in my Viewport3D, these have bounds of (w:1800, h:500, d:25). When a user clicks in the middle of the mesh, I want the Point3D of (900, 500, 25)... How can I achieve ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

WPF: writing smoke tests using ViewModels

I am considering to write smoke tests for our WPF application. The question that I am faced is: should we use UI automation( or some other technology that creates a UI script), or is it good enough to ...

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

How do WPF Markup Extensions raise compile errors?

Certain markup extensions raise compile errors. For example StaticExtension (x:Static) raises a compile error if the referenced class cannot be found. Anyone know the mechanism for this? Is it baked ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

How to combine DataTrigger and EventTrigger?

NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...