Help in developing custom component

I want to develop some custom component just like Apache Flex does. Hope someone can guide me through.

A simple test as follows, but it seems that the label is not applied…

Main.ux

<App>
    <CustomButton label="Some Label" />
</App>

CustomButton.ux

<CustomButtonClass>

    <Text
        Value="{label}"
        TextColor="#999999"
        />

</CustomButtonClass>

CustomButtonClass.uno

using Fuse.Controls;

public class CustomButtonClass : Panel
{
    public string label {get; set;}
}

Hi!

Try this:

<Panel ux:Class="CustomButtonClass">

  <Text ux:Name="label" TextColor="#999999"  />

</Panel>

And in Uno:

using Fuse.Controls;

public partial class CustomButtonClass 
{
    public string Label 
    { 
      get { return label.Value; }
      set { label.Value = value; }
    }
}

Then you can do:

<App>
  <CustomButton Label="Some Label" />
</App>

See the pattern? :slight_smile: Good luck!

Edit: had some errors in my previous post. Should be fixed now :slight_smile:

This is the solution for references https://www.fusetools.com/community/forums/bug_reports/fuse_app_not_launching_when_developing_custom_comp