locked
AppBar does not show up if an external page is loaded twice

    Question

  • Hello folks, I have ran into a weird problem and I am able to reproduce it with a sample project. I do not know whether below link works or not but if anybody can not open it I can send the project via email.

    http://www.2shared.com/file/Z3bcA7h2/AppbarProblem.html

    I have an application which is based on "Split Page" template. I am developing it using XAML/C++. In addition to this, from every split page, my application needs to open a new page which includes a SwapChainBackgroundPanel for DirectX interop but this seems to be no problem since even with a simple page (without interop) the problem reproduces.

    Here is the scenario, run everything in the simulator, otherwise it does not reproduce!!!

    - Click a group item on Items page, let split page open

    - From split page, click on the big button to open the blank page (in real app it is directx interop - for sample it is a blank page). Using code below open the new page.

    Window::Current->Content = ref new AppbarProblem::SamplePage();
    Window::Current->Activate();

    - In the blank page, swipe to open the app bar and tap on "Previous Page" button to return to the old page. Using code below, the old page is opened.

    Windows::UI::Xaml::Controls::Frame^ rootFrame = AppbarProblem::App::GetRootFrame();
    Window::Current->Content = rootFrame;
    Window::Current->Activate();

    - You are in the split page again, click on the big button to open the blank page for the second time. The blank page will be opened.

    - In the blank page, try opening the AppBar with swipe. It will not be opening. This is the problem.

    According to what I debug, AppBar's Closed event is called immediately after the Opened event therefore it does not let AppBar to be shown. In addition to this finding, AppBar's Closed event is not called when I go back to the Split page for the successful attempt to open the split page from the blank page.

    I think I might be misusing something here while messing up with the Frame navigation but everything works just fine except this glitch.

    Do you guys have a workaround (except I do the whole AppBar show/hide logic myself :D)? Or do you consider this as a bug?

    Thanks in advance.



    Monday, December 3, 2012 8:35 PM

All replies

  • Hi,

    I think you can binding the IsOpen property to open the AppBar programming.
    Please follow this thread
    http://social.msdn.microsoft.com/Forums/hi-IN/winappswithcsharp/thread/a22ecea5-6d74-4c95-86c4-ee9dd69ae07a

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 6, 2012 7:13 AM
  • Hi,

    Thanks for the answer. I am not sure I got the thread you posted but I think I have a different problem here. I can Open/Close the AppBar with setting IsOpen, that is no problem. The problem is that Windows does not give me the event correctly after the first successful try. The sample project I linked above clearly explains the problem. Please give it a try if you have time.

    Thursday, December 6, 2012 12:02 PM
  • Anyone from MSFT? This seems to be a almost clear bug.
    Sunday, December 9, 2012 1:08 AM
  • Hi,

    I downloaded and test this sample codes. But I cannot reproduce this issue.
    I can open the AppBar when I reopen the item. I use right click to open the AppBar.

    Maybe you can test this on another machine with release mode.

    There is a event for App Bar is opened or closed.
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.controls.appbar.opened.aspx
    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.controls.appbar.closed.aspx
     
    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 10, 2012 8:47 AM
  • Hi Jesse,

    As I pointed out in the original post, it only reproduce in the simulator with swipe gesture. The issue does not reproduce with right click as you pointed out.

    Thanks for sparing time.

    Monday, December 10, 2012 12:58 PM
  • Hi,

    I would suggest you to test this on the touch device. Sometimes, the simulator will have such issue on touch operator.

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, December 11, 2012 1:44 AM
  • Hi,

    Sorry but this answer can not be accepted. Even if it is simulator, this is a simulator bug.I do not have a touch device to test.

    In addition to this, I do not believe it is the simulator. it is clear that the swipe event is lost after the page is opened up twice.

    Could you please help to open a bug report for whomever is responsible for this problem.

    Tuesday, December 11, 2012 7:28 AM
  • I filed a bug for this issue to the Visual Studio Product team.

    https://connect.microsoft.com/VisualStudio/feedback/details/774296/appbar-does-not-show-up-if-an-external-page-is-loaded-twice#details

    • Marked as answer by Jesse Jiang Monday, December 17, 2012 7:34 AM
    • Unmarked as answer by Gokhan Sengun Tuesday, December 18, 2012 6:55 AM
    Friday, December 14, 2012 2:07 PM
  • Thanks for your feedback, please follow up this issue on the connect link. I will close this thread.

    Thanks for your understanding.

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 17, 2012 7:33 AM
  • Marking as answer is not correct since there is no answer yet. When there will be an answer in the future, I will mark it as an answer.
    Tuesday, December 18, 2012 6:56 AM