WPF绑定问题 [英] WPF Binding problems

查看:83
本文介绍了WPF绑定问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这就好了。



我一直在使用IDE,现在要实现AvalonDock我必须使用WPF,所以我迁移了洞项目兼容。但是我遇到了一个我无法解决的问题。



我在一个名为''Documents'的ObservableCollection(Of DocumentViewModel)上获得了所有文件我几乎每次都访问这个集合,因为这是我存储用户定义的函数,错误等的事实。

事情是,使用AvalonDock我必须使用模板,这里是'我创建''DocumentView''是拥有语法编辑器(ScintillaNet)的控件。

现在我的问题是,如何用文档中的项目指示应用程序他应该用作每个打开文档的datacontext?

Well here''s the thing.

I''ve been working on an IDE and now to implement the AvalonDock I must use WPF so I migrate the hole project to be compatible. But I''ve got a problem that I can''t solve.

I got all the documents on an ObservableCollection(Of DocumentViewModel) called ''Documents'', I access to this collection almost every time due the fact this is where I store user defined functions, errors, etc.
The thing is that with AvalonDock I must use a template, here''s where I create ''DocumentView'' with is the control that holds the Syntax Editor (ScintillaNet).
Now my question is, how to indicate the app with of the items inside ''Documents'' he should use as a datacontext for each opened document?

推荐答案

在WPF中使用Scintilla听起来很有问题。为什么不使用AvalonEdit呢?请参阅此CodeProject文章:

使用AvalonEdit(WPF文本编辑器) ) [ ^ ]。



-SA
Using Scintilla in WPF sounds quite questionable to me. Why not using AvalonEdit instead? Please see this CodeProject article:
Using AvalonEdit (WPF Text Editor)[^].

—SA


这篇关于WPF绑定问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆