# How to migrate this from \<Style\> to ux:Class

**URL:** <https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608>\
**Category:** How-to Discussions\
**Created:** [April 2, 2016, 7:58pm UTC](https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608 "2016-04-02T19:58:26Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [April 2, 2016, 7:58pm UTC](https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608/1 "2016-04-02T19:58:26Z")

</div>

Can someone help me rewrite this:

```auto
<Style>
    <Button ux:InheritStyle="false" Background="#55ACEE" Name="self"> <Fuse.BasicTheme.ButtonText TextColor="#FFF" Font="RobotoMedium" Value="{Property self.Text}" TextAlignment="Center"/></Button>
</Style>

```

To something like:

```auto
<Button ux:Class="CustomButton" ...>
 // stuff
</Button>

```

Could someone explain how this would be done, with some explanation

---

<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:** [April 2, 2016, 10:05pm UTC](https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608/2 "2016-04-02T22:05:34Z")

</div>

Hi!

It’s pretty straight forward. Just put all properties and inner tags from the Button in `Style` on the class tag instead.

You can drop `ux:InheritStyle` now, just delete it.

Next step is to start using `CustomButton` instead of `Button` whenever you want to use your custom class.

---

<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:** [April 2, 2016, 11:04pm UTC](https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608/3 "2016-04-02T23:04:50Z")

</div>

Yea I understand that part, but the style is not the same when using:

```auto
<Button ux:Class="TabButton" Name="self" Background="#55ACEE">
    <Fuse.BasicTheme.ButtonText TextColor="#FFF" Font="RobotoMedium" Value="{Property self.Text}" TextAlignment="Center"/>
</Button>

```

The background color of the button doesn’t change for some reason, the `ux:InheritStyle="false"` made that work, but its not allowed on the `<Button>` unless its inside a `<Style>` tag

---

<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:** [April 3, 2016, 5:56pm UTC](https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608/4 "2016-04-03T17:56:22Z")

</div>

Your code doesn’t make much sense. What are you actually trying to do here?

With this level of customization, consider just using a `<Panel>` as the base class, and build your control from scratch.

---

<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:** [April 3, 2016, 5:58pm UTC](https://forums.fusetools.com/t/how-to-migrate-this-from-style-to-ux-class/608/5 "2016-04-03T17:58:33Z")

</div>

Yea that’s what I ended up doing thanks.
