Forum Discussion

tscholze's avatar
tscholze
Iron Contributor
Aug 24, 2021
Solved

Is there a better way to show only one pane instead of setting the 'MinWideModeWidth' property?

Hi team,

 

I want to achieve that my TwoPaneView has on single screen mode just Pane1 visible and only if it is spanned it should show Pane2 on the other screen.

 

As day 1 of my dual screen developing adventure I just use exorbitant high values for `MinWideModeWidth` and `MinTallModeHeight`.

 

<dualScreen:TwoPaneView 
   x:Name="DualScreenView"  
   MinWideModeWidth="4000" 
   MinTallModeHeight="4000">

 

Is there any "future safer" pattern that I can use to get my desired outcome?

 

Thanks for any helpful tip!

 

  • tscholze sorry I missed this when you posted - I have email notifications set up but somehow I missed it. I actually covered a similar question in a livestream recently with James Montemagno, although it's a long live-coding session 😬 I think we covered this towards the end...

     

    We used the span mode trigger to set properties based on the app state (although we also ended up setting MinWide and MinTall as well). The alternative would probably to use DualScreenInfo to detect and set the pane visibility in code behind.

2 Replies

  • tscholze sorry I missed this when you posted - I have email notifications set up but somehow I missed it. I actually covered a similar question in a livestream recently with James Montemagno, although it's a long live-coding session 😬 I think we covered this towards the end...

     

    We used the span mode trigger to set properties based on the app state (although we also ended up setting MinWide and MinTall as well). The alternative would probably to use DualScreenInfo to detect and set the pane visibility in code behind.

    • tscholze's avatar
      tscholze
      Iron Contributor
      No problem, thanks for your amazing help! I'll have a look.

Resources