Bug 27292 - Images used in Resource Dictionary don't render
Summary: Images used in Resource Dictionary don't render
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-02-22 19:05 UTC by paulpatarinski
Modified: 2015-06-05 16:02 UTC (History)
6 users (show)

Tags: android functional resources AC
Is this bug a regression?: ---
Last known good build:

Issue Screenshot (100.27 KB, image/png)
2015-02-22 19:05 UTC, paulpatarinski

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:

Description paulpatarinski 2015-02-22 19:05:09 UTC
Created attachment 9968 [details]
Issue Screenshot

When an image is used in a Resource Dictionary only a single image gets rendered. 

Example here : 


Sample App : 


Expected Result : 2 Images get rendered
Actual Result : 1 Image gets rendered
Comment 1 Udham Singh 2015-02-26 10:20:32 UTC
I have checked this issue with the help of sample app given in bug description and able to reproduce the reported behaviour. Please refer the screencast : http://www.screencast.com/t/qJMzztEMcw

Ide Log : https://gist.github.com/Udham1/3ea9e0e8f68e264fc0ac
Adb Logcat : https://gist.github.com/Udham1/f050270f291fc52a7c4e
Application Output : https://gist.github.com/Udham1/ddef8eb2614e13e3ae3b

Environment Info : 

Xamarin.Forms :

=== Xamarin Studio ===

Version 5.7.2 (build 7)
Installation UUID: ce927b2a-2c07-44c5-b186-09cfdafba6dc
	Mono 3.12.0 ((detached/b8f5055)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000077

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 862702c
Build date: 2015-02-18 15:19:23-0500

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/xamarin76/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Build Information ===

Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 09:14:27-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef

=== Operating System ===

Mac OS X 10.9.5
Darwin Xamarin76s-Mac-mini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Stephane Delcroix 2015-06-05 15:28:26 UTC
an Image is a VisualElement in Xamarin.Forms, just like Label, or Button, and VisualElements can not be used multiple times simultaneously (re-using is fine).
By declaring the Image as a resource, you are reusing the same Image instance over and over again, and that's why only one is visible.

In your case, I'd define a Style for the Image in the ResourceDictionary, and apply the same style to the multiple image instance,