Prism navigation



  • Asked about navigation in Prism. https://ru.stackoverflow.com/questions/470803/prism-%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0-%D1%81-%D1%80%D0%B5%D0%B3%D0%B8%D0%BE%D0%BD%D0%B0%D0%BC%D0%B8/472741#472741 ♪ Got the answer to read the list of articles. I've got the navigation.

    But there was another question. I've got an app with a set window that's not open at first. If I add the regions in the main window, they are well displayed (navigation works correctly), and if the same regions are created in another window, Prism cannot see these regions.

    Shell

    <Grid Grid.Row="1">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
    
    &lt;ItemsControl Grid.Row="0" prism:RegionManager.RegionName="HeadersStreamSite"/&gt;
    &lt;ContentControl Grid.Row="1" prism:RegionManager.RegionName="ContentStreamSite"/&gt;
    

    </Grid>

    Option Shell

    <Grid Grid.Row="1">
    <Grid.RowDefinitions>
    <RowDefinition />
    <RowDefinition />
    </Grid.RowDefinitions>

    &lt;ItemsControl Grid.Row="0" prism:RegionManager.RegionName="HeadersStreamSite"/&gt;
    &lt;ContentControl Grid.Row="1" prism:RegionManager.RegionName="ContentStreamSite"/&gt;
    

    </Grid>

    The example shows that the code is exactly the same, but in the first case, navigation works, and in the second, it makes a mistake that the ContentStreamSite region does not exist.



  • You'd still be the whole cycle of articles Prism ♪ https://habrahabr.ru/post/176895/

    ♪ ♪ ♪ The root element of the composite annex is called the shell (Shell). The shell works as an annex workshop and consists of several regions (Region). ♪ ♪

    I mean, you can't have two. Shell♪ Do a separate window for construction. View which will be loaded into the main region with a button.RegionManager.RequestNavigate()or in a fashion window InteractionRequestTrigger)


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2