Bug 21563 - Setting a button's Image property in common code, but resource not yet added to Droid project
Summary: Setting a button's Image property in common code, but resource not yet added ...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-24 06:21 UTC by John Hair
Modified: 2015-04-14 16:30 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description John Hair 2014-07-24 06:21:03 UTC
If you have not yet added the image you use in common code (e.g. I was working on iOS first), then try to run it on Droid (simulator tested) the app will simply hang, no error message. Example code:

            btn.Image = (FileImageSource) ImageSource.FromFile("dialpad.png");

If dialpad.png does not exist in the Droid project the app will hang with no error, and no obvious reason as to what might be wrong.

If trying the same on iOS and reference an image that has not yet been added, an exception is raised. Although not on the line where the image is being referenced, or including the fileName in question.
Comment 1 Seth Rosetter 2015-04-14 16:30:09 UTC
This should no longer be an issue in 1.4.3-pre1. 

Thanks!

-Seth