Search Unity

pushing SwapChainBackgroundPanel to new view or to have UserControls?

Discussion in 'Windows' started by tswalk, Aug 8, 2013.

  1. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I think I may already have an answer for myself, but I wanted to put this idea out to see if it can be done...

    Is it possible, to push Unity to a new view with a different SwapChainBackgroundPanel defined without having to re-"initializeD3DXAML" on the thread?

    I would imagine that I would have to push appcallbacks.setcorewindowevent to the new view to hook events, but does the Unity process get killed this way? I think when I try this, the main UI thread gets suspended and Unity freezes.. but I'm not totally sure what I'm doing so far (obviously).

    The reason why I'm experimenting with this is that I'm a little more use to just creating new views/view-models and navigating those.. handling my bindings in the viewmodel. I can still do things this way, but with UserControls.. it just gets a bit messy and I have to handle navigation and state management myself (not a huge deal I suppose).

    this is all out of curiosity and learning.. so yeah.

    thanks!
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,919
    You can only initialize Unity once, and from your description it seems you want to do it twice or more? I doubt that such scenario is supported
     
  3. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    yeah, you're right.. I've tried multiple ways to change views and switch swapchains, but it doesn't work like I thought it would. I'll need to just work with usercontrols on a single view. that's ok, perhaps with windows 8.1 and swapchainpanel, unity will support it somehow.