# Image Property in ux:Class

**URL:** <https://forums.fusetools.com/t/image-property-in-ux-class/3880>\
**Category:** How-to Discussions\
**Created:** [May 4, 2016, 6:14pm UTC](https://forums.fusetools.com/t/image-property-in-ux-class/3880 "2016-05-04T18:14:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdalla\_Mohamed](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/abdalla_mohamed/32/110_2.png) [@Abdalla\_Mohamed](https://forums.fusetools.com/u/Abdalla_Mohamed)\
**Post date:** [May 4, 2016, 6:14pm UTC](https://forums.fusetools.com/t/image-property-in-ux-class/3880/1 "2016-05-04T18:14:14Z")

</div>

I’m trying to implement a sidebar menu that contains navigation links. I’ve made a MenuItem class here

```auto
<Panel ux:Class="MenuItem" Clicked="{NavigateToPage}">

    <string ux:Property="ItemText" />
    <string ux:Property="Icon" />

    <Image File="{Property Icon}" Width="35" Height="35" Alignment="CenterLeft" Margin="15, 0, 20, 0" Opacity="0.6">
        <DropShadow /> 
    </Image>

    <Text Value="{Property this.ItemText}">
        <DropShadow Spread="0.1" />
    </Text> 

</Panel>

```

I need some way to pass which image I want to use for the icon so what do you suggest? I know passing the file name won’t work -obviously-, but I attached this snippet of code to give you an idea of what I’m trying to accomplish. I know there’s a type called Resource but I haven’t had much luck trying to implement it.

---

<div class="post-metadata">

**Author:** ![Edwin\_Reynoso](https://avatars.discourse-cdn.com/v4/letter/e/e99b99/32.png) [@Edwin\_Reynoso](https://forums.fusetools.com/u/Edwin_Reynoso)\
**Post date:** [May 4, 2016, 6:49pm UTC](https://forums.fusetools.com/t/image-property-in-ux-class/3880/2 "2016-05-04T18:49:57Z")

</div>

Change `<string ux:Property="Icon" />` with `<FileSource ux:Property="Icon" />`

and you forgot the `this` in `File="{Property Icon}"` so it should be: `File="{Property this.Icon}"`

---

<div class="post-metadata">

**Author:** ![Abdalla\_Mohamed](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/abdalla_mohamed/32/110_2.png) [@Abdalla\_Mohamed](https://forums.fusetools.com/u/Abdalla_Mohamed)\
**Post date:** [May 4, 2016, 6:58pm UTC](https://forums.fusetools.com/t/image-property-in-ux-class/3880/3 "2016-05-04T18:58:44Z")

</div>

> **Edwin Reynoso wrote:**
> 
> Change `<string ux:Property="Icon" />` with `<FileSource ux:Property="Icon" />`
> 
> and you forgot the `this` in `File="{Property Icon}"` so it should be: `File="{Property this.Icon}"`

Thank you!! I’m loving the concept of Classes, but the documentation on them isn’t that descriptive. Do you know of any other video tutorials or books? Other than Jake’s Videos

---

<div class="post-metadata">

**Author:** ![Edwin\_Reynoso](https://avatars.discourse-cdn.com/v4/letter/e/e99b99/32.png) [@Edwin\_Reynoso](https://forums.fusetools.com/u/Edwin_Reynoso)\
**Post date:** [May 4, 2016, 7:00pm UTC](https://forums.fusetools.com/t/image-property-in-ux-class/3880/4 "2016-05-04T19:00:40Z")

</div>

Nope but there’s the Reference page: [https://www.fusetools.com/learn/reference](https://www.fusetools.com/learn/reference)

Click `Image` scroll to the `File` property and next to it is `FileSource` and that’s how you know which property is needed
