# Using members from custom classes in ux not working anymore?

**URL:** <https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163>\
**Category:** Bug Reports\
**Created:** [July 30, 2015, 9:17pm UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163 "2015-07-30T21:17:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Havard\_Homb](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/havard_homb/32/229_2.png) [@Havard\_Homb](https://forums.fusetools.com/u/Havard_Homb)\
**Post date:** [July 30, 2015, 9:17pm UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/1 "2015-07-30T21:17:47Z")

</div>

[https://www.fusetools.com/developers/guides/uxmarkup/usingyourownclasses](https://www.fusetools.com/developers/guides/uxmarkup/usingyourownclasses)

I’ve been using this throughout my codebase, but after updating to the latest (0.5.3278) I get “‘TestButton’ does not have a property called ‘Text’” when running the app (not on compile but runtime).

TestButton:

```auto
public class TestButton
{
    public string Text
    {
        get...
        set...
    }
}

```

Usage:

```auto
<TestButton Text="TEST"/>

```

(I have also tried to define text as a StyleProperty (as in IsMultiline in Text, but no avail)

Has this been removed? In that case, what do you suggest to do?

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [July 31, 2015, 7:30am UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/2 "2015-07-31T07:30:02Z")

</div>

This works, and your code looks fine - this is how all properties in Fuse are exposed.

For us to debug this you have to provide a more complete test case.

Nothing has been changed with regards to this.

---

<div class="post-metadata">

**Author:** ![Havard\_Homb](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/havard_homb/32/229_2.png) [@Havard\_Homb](https://forums.fusetools.com/u/Havard_Homb)\
**Post date:** [July 31, 2015, 7:58am UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/3 "2015-07-31T07:58:24Z")

</div>

Good to hear, Ill try to extract a testcase from my codebase later today

---

<div class="post-metadata">

**Author:** ![Havard\_Homb](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/havard_homb/32/229_2.png) [@Havard\_Homb](https://forums.fusetools.com/u/Havard_Homb)\
**Post date:** [July 31, 2015, 10:49am UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/4 "2015-07-31T10:49:49Z")

</div>

[https://dl.dropboxusercontent.com/u/1881490/CustomMemberTest.zip](https://dl.dropboxusercontent.com/u/1881490/CustomMemberTest.zip)

Simple testcase

When running preview nothing happens until after a couple of seconds where a window pops up in sublime with

```auto
- Auto Reload Result -

'TestButton' does not have a property called 'Text' - ...\CustomMemberTest\MainView.ux(3:1):E

```

When removing the Text=“Hallo” from the testbutton in mainview, it runs fine.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [July 31, 2015, 11:07am UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/5 "2015-07-31T11:07:11Z")

</div>

Hi,

Code behinds do not take effect in preview within the same project. This is because code behinds can not be simulated with live preview, they need to be recompiled when changed.

If you want to create components using UX+Uno code behinds, you need to set this up as two separate projects. Your UI components in one project, and your top level app in another, and add a reference to your components project from your main app.

Whenever you change the component code you’ll have to restart Fuse preview.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [July 31, 2015, 11:08am UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/6 "2015-07-31T11:08:33Z")

</div>

Code behinds do however take effect in regular builds (not preview), for example:

```auto
uno build --target=DotNetExe --run

```

This approach does not require the two-project set-up, but then again, doesn’t give you live preview.

---

<div class="post-metadata">

**Author:** ![Havard\_Homb](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/havard_homb/32/229_2.png) [@Havard\_Homb](https://forums.fusetools.com/u/Havard_Homb)\
**Post date:** [July 31, 2015, 11:27am UTC](https://forums.fusetools.com/t/using-members-from-custom-classes-in-ux-not-working-anymore/6163/7 "2015-07-31T11:27:30Z")

</div>

Ah ok I see. Well I’ll just use the normal builds for now then. Way to heavily invested in code behinds atm, but pulling out components in its own project might be a good idea no matter what.
