Closed MattePozzy closed 1 year ago
I did it!
For reference this is my components:
public class VolosEntry : VStack
{
public Label label;
public Entry campo;
public VolosEntry()
{
label = new();
campo = new();
Add(label);
Add(campo);
}
}
public static class VolosEntryExtensions
{
public static T LabelText<T>(this T label, string text) where T : VolosEntry
{
ref T val = ref label;
T val2 = default(T);
if (val2 == null)
{
val2 = val;
val = ref val2;
}
val.label.Text(text);
return label;
}
public static T LabelText<T>(this T label, Func<string> textFunc) where T : VolosEntry
{
ref T val = ref label;
T val2 = default(T);
if (val2 == null)
{
val2 = val;
val = ref val2;
}
val.label.Text(textFunc);
return label;
}
}
Hi, I need to create a custom component made with a label and an entry both wrapped in a Grid container.
I have created this class:
and used like this:![image](https://github.com/adospace/reactorui-maui/assets/7420345/a607e80b-28ba-40f3-ad61-424dc91f89e1)
but nothing is rendered.
How can I solve this?
Thank you.