同时在两个位置显示画布 [英] displaying a canvas at two positions simultaneously

查看:73
本文介绍了同时在两个位置显示画布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,使用WPF组件,是否可以在屏幕上的两个位置显示画布(其内容根据用户输入在运行时更改)?或在两个窗口中?因此,基本上,放在一个位置的画布中发生的任何事情都发生在位于另一个位置的画布中.

In C#, using WPF components, Is it possible to display a canvas (whose contents change at run time based on user input) at two positions on the screen? or in two windows? So basically, whatever happens in the canvas positioned at one place happens in the canvas positioned in the other place.

推荐答案

您可以使用VisualBrush ,为此目的.

您可以添加矩形,并用包含您的Canvas作为其VisualVisualBrush设置其Fill.

You can add a Rectangle and, set its Fill with a VisualBrush that contains your Canvas as its Visual.


这篇关于同时在两个位置显示画布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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