开发者

Can controls rendered within a wpf Viewport3D using a VisualBrush fire their specific events?

开发者 https://www.devze.com 2023-01-10 02:06 出处:网络
I\'m trying to render a Button on a GeometryModel3D by using a VisualBrush. Is there a way I can handle the button\'s click event directly? (or is it that the VisualBrush only renders the image of a b

I'm trying to render a Button on a GeometryModel3D by using a VisualBrush. Is there a way I can handle the button's click event directly? (or is it that the VisualBrush only renders the image of a button and I am supposed to us开发者_运维技巧e the VisualTree in order to check if the button was pressed? )

Thanks!


A brush is just a brush - you will not get events or behaviors associated with the source element of the VisualBrush. If your goal is to render interactive 2D controls on a 3D mesh then take a look at the Viewport2DVisual3D class.

0

精彩评论

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