How can I avoid flicker in a WPF fullscreen app?

后端 未结 8 863
春和景丽
春和景丽 2020-12-31 11:41

I have a WPF application that is a fullscreen kiosk app. It\'s actually a pretty complicated app at this point, but here\'s some code that shows the basic idea. Essentiall

8条回答
  •  滥情空心
    2020-12-31 12:18

    Here is an easy alternative that works for me in my kiosk-like application with a black background, inspired from above answers. Here I have a "LanguageWindow" that can be opened from anywhere in the application to change the current language.

    In LanguageWindow.xaml (check the WindowState=Minimized):

    
    

    In LanguageWindow.xaml.vb:

    Private Sub LanguageWindow_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
        Me.WindowState = WindowState.Maximized
    End Sub
    

    Voilà!

    (done with Visual Studio 2015, .NET Framework 4.6, WPF, VB.net)

提交回复
热议问题