c# - How to create a SecondaryTile? -


i created method insert startscreen secondarytile, exception when try retrieve string of saved file , insert uri

    private  async void addstart_click(object sender, routedeventargs e)     {           storagefile x= await applicationdata.current.localfolder.createfileasync("immagine.png", creationcollisionoption.replaceexisting);  //muss.immagine web url           uri uri = new uri(muss.immagine, urikind.relativeorabsolute);           backgrounddownloader downloader = new backgrounddownloader();           downloadoperation download = downloader.createdownload(uri, x);           await download.startasync();            string uristring = applicationdata.current.localfolder.getfileasync("immagine.png").tostring();           uri newww = new uri(uristring);           secondarytile tile = new secondarytile("openarte", "open arte of italy", "open arte of italy", "15", tileoptions.shownameonlogo, newww);           await tile.requestcreateasync();         } 

i exception when create uri "newww". exception:

a first chance exception of type 'system.uriformatexception' occurred in system.ni.dll

additional information: invalid uri: format of uri not determined.

...localfolder.getfileasync("immagine.png").tostring(); return same result similar "...iasyncoperation<storagefile>" because default tostring returns type name (and result of type iasyncoperation<storagefile>).

i'm not sure trying achieve, may need read content of storagefile. additionally need await result of function storagefile object - how file using winrt? , get specified line text using readline method.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -