microsoft band - How to use the IBandClient addtileasync method within an mvvm project such as template10 Minimal -


the addtileasync method on bandclient opens modal dialog asking permission install tile on microsoft band. in mvvm application template10 dialog not presented , tile not added. how method implemented given mvvm implementation?

i ran same problem...i'm using caliburn micro without template10, believe overall architecture similar. best can determine, popup implemented assuming window.current frame tries grab, navigate auth dialog , navigate after user approves. tried several approaches , 1 works me (although complete kludge i'm not thrilled with) inject frame mention above. however, before doing so, copy shellview public property on app can go after adding tile. code looks this:

when need add tile (on setting view):

        ((app)application.current).shellholder = window.current.content;          frame rootframe = window.current.content frame;         if (rootframe == null)         {             rootframe = new frame();             window.current.content = rootframe;         }          rootframe.navigate(typeof(bandaddtileview));         window.current.activate(); 

then, in bandtileview when it's logic wrapped up, call this:

    private void resetshell(bandtileresult result) {         var app = (app)application.current;         if (app == null) return;          app.tileresult = result;          window.current.content = (uielement)app.shellholder;         window.current.activate();     } 

i have logic in when shellview comes in play navigates settings view , deals bandtileresult.

like said, it's kludge , not entirely elegant seems working ok , little styling on bandaddtileview presents pretty user experience app user.

any feedback band dev team welcome on better mvvm approach!


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -