Windows universal URI format exception -
i'm working on windows universal app. want show user image. image located in subfolder within assets folder, in both phone , windows folder.
i'm trying put image in variable in class in shared folder. continously getting uri exceptions.
my code looks this:
uri uri = new uri("/assets/image/avatar_anonymous.png"); chat_profilepicture_bitmap = new bitmapimage(uri);
i've tried different urls, , without capitals, entire path "c://blablabla", , many more. nothing seems working. have tried: pack://application:,,,/ suggested multiple stackoverflow threads. no luck there.
i'm thinking problem lies in image being in project, there way around this? or if isn't problem, doing wrong?
try this
uri uri = new uri("ms-appx:///assets/image/avatar_anonymous.png");
hope helps
Comments
Post a Comment