Open briankandersen opened 6 years ago
Could you please attach a sample project that reproduces the issue?
On Wed, 2 May 2018 at 09:27, Spaizkadett notifications@github.com wrote:
I have a tabcontrol with two tabitems. I initialize WebEye in the second tabtite. When I switch to that Item, WebEye is just White. If I initialize it in TabItem #1 https://github.com/jacobbo/WebEye/pull/1, it works. Also, if I initialize WebEye on Selector.SelectionChanged on tabitem #2 https://github.com/jacobbo/WebEye/issues/2 it still doesn' render anything. Only if TabItem #2 https://github.com/jacobbo/WebEye/issues/2 is the default selected item wil it work in TabItem #2 https://github.com/jacobbo/WebEye/issues/2
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jacobbo/WebEye/issues/50, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvfwB9vzjiM3rnAzOE9aniEeKPRHHfJks5tuW32gaJpZM4TvDFW .
If you change "\WebEye\WebCameraControl\WPF\WebCameraDemo\MainWindow.xaml" to the attached file, hit start and switch to webcam tabitem, you can see it doesn't render, even though the camera light is on.
If you go to the WebCam TabItem first and then hit Start it works
Sorry, I'm afraid, the visibility of the hosting control is a requirement. I use the HwndSource class under the hood and it creates its window only when gets visible.
As a workaround you can show the second tab for a fraction of a second and then go back to the first one.
I have a tabcontrol with two tabitems. I initialize WebEye in the second tabtite. When I switch to that Item, WebEye is just White. If I initialize it in TabItem #1, it works. Also, if I initialize WebEye on Selector.SelectionChanged on tabitem #2 it still doesn' render anything. Only if TabItem #2 is the default selected item wil it work in TabItem #2