We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Resource view image from uri instead of android resource

Thread ID:

Created:

Updated:

Platform:

Replies:

147124 Sep 2,2019 11:40 AM UTC Sep 3,2019 12:11 PM UTC Xamarin.Forms 1
loading
Tags: SfSchedule
Krunal
Asked On September 2, 2019 01:13 PM UTC

Is it possible to set the uri i.e. any blob url as image location in the resource viewer implementation for SfScheduler control? My code works well if I use the image from resources (i.e. images added into the drawable folder of Android project) but doesn't work and throw null reference exception when I give blob url in Image string parameter.

Can you pls confirm whether image url will work with resource viewer or not and if yes can you provide the sample/code snippet?

Thanks,

Subburaj Pandian Veluchamy [Syncfusion]
Replied On September 3, 2019 12:11 PM UTC

Hi Krunal, 
  
Thank you for contacting Syncfusion support. 
  
Schedule Resource view implemented from getting images from local files and your requirement of “Load Resource image from URL” can be achieved using custom ResourceItemTemplate view, using which custom view can be provided as Resource display picture and these images can be directly loaded from either database or URL. 
  
[Code Snippet] 
 
schedule.ResourceItemTemplate = new DataTemplate(() => 
{ 
    return new Image 
    { 
        Source = ImageSource.FromUri( new Uri("Image URL")), 
    }; 
}); 
 
  
We have prepared a simple sample for the same, 
 
Sample link: ResourceView 
  
Kindly refer our UG documentation to know more about Resource view customization using DataTemplate and TemplateSelector, 
 
  
We hope this helps. Kindly revert us if you have any concern. 
  
Regards,
Subburaj Pandian V   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon