# Setting Image from Uno

**URL:** <https://forums.fusetools.com/t/setting-image-from-uno/3012>\
**Category:** How-to Discussions\
**Created:** [May 27, 2015, 9:51am UTC](https://forums.fusetools.com/t/setting-image-from-uno/3012 "2015-05-27T09:51:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Inge\_Asbjornsen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sean_inge_asbjornsen/32/578_2.png) [@Sean\_Inge\_Asbjornsen](https://forums.fusetools.com/u/Sean_Inge_Asbjornsen)\
**Post date:** [May 27, 2015, 9:51am UTC](https://forums.fusetools.com/t/setting-image-from-uno/3012/1 "2015-05-27T09:51:41Z")

</div>

How do i set an image from Uno?

TabContent content = new TabContent( );

TabContent.IconPath = “my/path/image.png”;

button.mxImage.File = import BundleFile(content.IconPath);

This fails with the error

There is nothing named ‘content’ accessible in this scope. Did you perhaps misspell ‘Content’ (as in Experimental.Net.Http.HttpRequest.Content), ‘Content’ (as in Experimental.Net.Http.HttpResponse\<\>.Content) or ‘Content’ (as in Experimental.Net.Http.HttpResponse.Content), or one of 13 other similar candidates? Could you be missing a package reference? - /Users/Sean/Documents/ZpindlerMain/UIComponents/UIComponents/TabViewer/TabViewer.ux.uno(81:43):E

Argument must be a constant value - (0:0):E

I am able to set the image when writing the path directly into import BundleFile

---

<div class="post-metadata">

**Author:** ![edA-qa\_mort-ora-y](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/eda-qa_mort-ora-y/32/124_2.png) [@edA-qa\_mort-ora-y](https://forums.fusetools.com/u/edA-qa_mort-ora-y)\
**Post date:** [May 27, 2015, 9:59am UTC](https://forums.fusetools.com/t/setting-image-from-uno/3012/2 "2015-05-27T09:59:19Z")

</div>

You must have a constant string inside the `import BundleFile` since this tells the compiler which resources to actually pack into your application bundle. Dynamic strings aren’t allowed since those resources would not be included in the bundle.

To have a list of resources you can simply import several BundleFiles and assign them to `File` whenever you want to load that image. Don’t worry, these are only loaded on demand, the import itself just establishes the connection to the file.

---

<div class="post-metadata">

**Author:** ![Sean\_Inge\_Asbjornsen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sean_inge_asbjornsen/32/578_2.png) [@Sean\_Inge\_Asbjornsen](https://forums.fusetools.com/u/Sean_Inge_Asbjornsen)\
**Post date:** [May 27, 2015, 10:21am UTC](https://forums.fusetools.com/t/setting-image-from-uno/3012/3 "2015-05-27T10:21:28Z")

</div>

Ok. Found another way to do this now. Thanks!
