Binding Image stored in the Isolated Storage to Image Control in Windows Phone

后端 未结 2 1453
花落未央
花落未央 2020-12-18 10:49

Is it possible to bind the image present in the Isolates storage to image control through xaml. I found some implementations like getting the image through the property and

2条回答
  •  一整个雨季
    2020-12-18 10:58

    I like the above approach but there is a simpler more hacky way of doing it if you are interested.

    You can go into your xaml and bind the image source to an string property then put the file path into the property dynamically.

    
     
    
    
    //Behind property
    public String imagePath { get; set; }
    

    load your path into the image path then bind the image source to the image path string. You might have to do an INotifyPropertyChanged but this method should work with proper binding.

提交回复
热议问题