开发者

Visual studio tries to run the program within the editor and crashes

I have a WPF projet that uses the WPFMediaKit and I have realised that it runs the camera and even the MessageBox.Show() code when in visual studio editing. That wouldn't be a problem if it was only the camera that it was trying to run its doing some other stuff that crash the instant i go into design view.

Why is this happening and whe开发者_运维技巧re can it be turned off? Is there some sort of livepreview-off switch?


You can't stop it, it's made so user controls can draw themselves and react smartly to the user at design time.

You can however check for the DesignMode property inside your control and not do the camera operations (or anything at all if you wish).


Sounds like a problem with WPFMediaKit itself. It should have been written to take the IsDesignMode property into account as Blindy pointed out...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜