Open aliEsmaelFard opened 8 months ago
It's triggered when form is submitted:
thats just a example, this is not working, real example:
//label
Label label = new Label()
{
Text = model.Text,
};
//radio
model.ListProp = new List<string> { "Yes", "No", "N/A" };
RadioButtonGroupView radioGroup = new RadioButtonGroupView();
radioGroup = MyUtils.DefineViewVals<RadioButtonGroupView>(radioGroup, model);
for (int i = 0; i < model.ListProp.Count; i++)
{
UraniumUI.Material.Controls.RadioButton radioButton = new UraniumUI.Material.Controls.RadioButton()
{
Text = model.ListProp[i],
};
radioGroup.Add(radioButton);
}
radioGroup.Orientation = StackOrientation.Horizontal;
//remark
TextField textField = new TextField()
{
Title = "Remarks"
};
textField.Validations.AddRange(MyUtils.DefineViewVals<TextField>(textField, model).Validations);
VerticalStackLayout vLayout = new VerticalStackLayout()
{
Spacing = 16,
Padding = 8,
Children = { label, radioGroup, textField }
};
Frame frame = new Frame()
{
CornerRadius = 4,
BackgroundColor = Colors.LightCyan,
ClassId = model.Id
};
frame.Content = vLayout;
formView.Add(frame);
For now, I can just add new properties to validations to handle these operations. I'll need to create a new validation logic and drop the InputKit dependency in near future.
validations in child inner Control seems not working
Is there a way to make CheckBox Validations work?