c# - Monogame XAML Reset CoreWindow? -


heey,

i got problem. i'm running through last tests had finishing game bumped problem. whenever initialize game while holding game in portrait game swaps landscape window.current.corewindow won't update. xaml template creates window based on portrait settings instead of landscape settings. how can change corewindow or update before entire game gets initialized?

after research tried reproducing game armed! know uses xaml template , there found problem when opened in portrait window wouldn't update when moving landscape being stuck broken interface/game.

thanks in advance.

corewindow won't refresh on own. it'll refresh inside update(). if want handle changes corewindow before hit initializing part need handle them yourself.

_corewindow = window.current.corewindow;  // create game. _game = xamlgame<main>.create("", _corewindow, this);  _corewindow.activate(); _corewindow.dispatcher.processevents(coreprocesseventsoption.processallifpresent); 

here see create game current corewindow. after constructor of game done manually check , process changes of corewindow may have happen in mean time (mainly orientation changes) , process them when game initializes it'll run in proper full landscape resolution.

it may not clean solution job in case.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -