Use this file to discover all available pages before exploring further.
UIMetadataFramework.Basic provides a variety of input components for collecting user data. Each component is automatically selected based on the property type or can be explicitly specified using wrapper types.
The boolean input component renders as a checkbox.Component type:booleanProperty type:bool
using UiMetadataFramework.Core.Binding;public class MyRequest{ [InputField(Label = "Subscribe to newsletter")] public bool SubscribeToNewsletter { get; set; } [InputField(Label = "I agree to the terms", Required = true)] public bool AcceptTerms { get; set; }}
When to use: Yes/no questions, toggles, or any binary choice.
Use IDropdownInlineSource for a static list of items:
using System.Collections.Generic;using UiMetadataFramework.Basic.Inputs.Dropdown;using UiMetadataFramework.Core.Binding;// Define the dropdown sourcepublic class GenderSource : IDropdownInlineSource{ public IEnumerable<DropdownItem> GetItems() { return new[] { new DropdownItem("Female", "female"), new DropdownItem("Male", "male"), new DropdownItem("Other", "other") }; }}// Use in your requestpublic class MyRequest{ [InputField(Label = "Gender")] [Dropdown(typeof(GenderSource))] public DropdownValue<string>? Gender { get; set; }}
Use ITypeaheadRemoteSource for dynamic data loaded from a server:
using UiMetadataFramework.Basic.Inputs.Dropdown;using UiMetadataFramework.Basic.Inputs.Typeahead;using UiMetadataFramework.Core.Binding;[Form]public class CountrySource : ITypeaheadRemoteSource{ // Implementation loads countries from server}public class MyRequest{ [InputField(Label = "Country")] [Dropdown(typeof(CountrySource))] public DropdownValue<string>? Country { get; set; }}
Access the selected value:
protected override MyResponse Handle(MyRequest request){ var selectedGender = request.Gender?.Value; // Returns "male", "female", or "other"}
When to use: Single selection from a predefined list of options.
The typeahead component provides autocomplete functionality with search.Component type:typeaheadProperty type:TypeaheadValue<T>
using UiMetadataFramework.Basic.Inputs.Typeahead;using UiMetadataFramework.Basic.Inputs.Dropdown;using UiMetadataFramework.Core.Binding;// Define remote source[Form]public class UserSearchSource : ITypeaheadRemoteSource{ // Implementation searches users based on query}// Use in your requestpublic class MyRequest{ [InputField(Label = "Search users")] [Typeahead(typeof(UserSearchSource))] public TypeaheadValue<int>? UserId { get; set; }}
Access the selected value:
protected override MyResponse Handle(MyRequest request){ var selectedUserId = request.UserId?.Value;}
When to use: Searchable dropdowns, autocomplete fields, or when the list of options is too large for a regular dropdown.