开发者

MVVM- Is there any way I can bind the visual of a visual brush to another window?

I have a settings window and am trying to set it up so that there is a live preview what the main window will look like with the c开发者_Go百科urrent settings. Here is a picture of what the settings dialog looks like at the moment. The big black rectangle will be the preview.

MVVM- Is there any way I can bind the visual of a visual brush to another window?


This is really an implementation detail of the View, so you could look for ways to do this within the XAML (Move the brush to a shared dynamic resource?) or, if there is a direct dependency relationship, by using code-behind in the View to update the 'child' View with the Visual. There may also be other refactorings you could do that don't require this type of coupling, but it's hard to say without more detail. I wouldn't try to route any of this through the ViewModel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜