locked
Help.OOB Full Screen appear Black Block RRS feed

  • Question

  • When my app is running in OOB in Full screen mode, there is a Black Block appear in a middle screen.the black block size is the app's size when it's running not in Full Screen.

    change the screen the code :

    App.Current.Host.Content.IsFullScreen = !App.Current.Host.Content.IsFullScreen;

    my english is poor,i hope some one can help me .

    Thanks a lot 

    expect all your reply~~~

    Tuesday, November 16, 2010 9:43 PM

Answers

  • hi... first thanks for your reply

    and now i found why the Problem happen.

    My app have the  TopMost Function.when it's running in OOB Mode,and set the app's window TopMost(code:Application.Current.MainWindow.TopMost=true). there is a black Block appear in the middle screen.

    now i resolove it in these code:

    bool isTopMost = false;
                try
                {
                    if (Application.Current.IsRunningOutOfBrowser)
                    {
                        if (Application.Current.MainWindow.TopMost)
                            isTopMost = true;
                        Application.Current.MainWindow.TopMost = false;
                    }
                }
                catch (Exception ex)
                {
                    LogManager.Ins.DebugLog("异常:" + ex);
                }
                App.Current.Host.Content.IsFullScreen = !App.Current.Host.Content.IsFullScreen;
                Application.Current.MainWindow.TopMost = isTopMost;

    but,now sometimes it also happen the bug , i have no a better way to resolove it.

     

     

    Friday, November 19, 2010 6:01 AM

All replies

  • Hi,

    When my app is running in OOB in Full screen mode, there is a Black Block appear in a middle screen.the black block size is the app's size when it's running not in Full Screen.

    For this, I created a simple App for testing it, but it worked fine (no black block occured).

    Could you zip up your code for us so that we can test it?

    Thanks.

     

    Regards

    Thursday, November 18, 2010 4:52 AM
  • hi... first thanks for your reply

    and now i found why the Problem happen.

    My app have the  TopMost Function.when it's running in OOB Mode,and set the app's window TopMost(code:Application.Current.MainWindow.TopMost=true). there is a black Block appear in the middle screen.

    now i resolove it in these code:

    bool isTopMost = false;
                try
                {
                    if (Application.Current.IsRunningOutOfBrowser)
                    {
                        if (Application.Current.MainWindow.TopMost)
                            isTopMost = true;
                        Application.Current.MainWindow.TopMost = false;
                    }
                }
                catch (Exception ex)
                {
                    LogManager.Ins.DebugLog("异常:" + ex);
                }
                App.Current.Host.Content.IsFullScreen = !App.Current.Host.Content.IsFullScreen;
                Application.Current.MainWindow.TopMost = isTopMost;

    but,now sometimes it also happen the bug , i have no a better way to resolove it.

     

     

    Friday, November 19, 2010 6:01 AM