c# - How to update an image on a page in UWP? -
i've got gridviewitem. gridviewitem has background imagebrush. want change imagebrush new source when clicking button. for i'm using: blck.background = new imagebrush(new bitmapimage(new uri("ms-appx:///assets/sensorbg.png"))); it work new image shows whenever click on corresponding gridviewitem. can tell me how update without having click on gridviewitem? i've tried put within block no success: coreapplication.mainview.corewindow.dispatcher.runasync(coredispatcherpriority.normal, () => { blck.background = new imagebrush(new bitmapimage(new uri("ms-appx:///assets/sensorbg.png"))); } ); the best be, if have defined itemclass suitable properties , implement inotifypropertychanged - appropriate binding, every change update ui. here small sample - xaml: <stackpanel> <button content="change background of second item" click="but...