Xamarin Forms 扩展控件
Description Xfx Controls are just a few controls that differ from the baked in Xamarin.Forms Controls.
| iOS | Android | UWP | Mac | |
|---|---|---|---|---|
| XfxEntry | :white_check_mark: | :white_check_mark: | :x: | :x: |
| XfxComboBox | :white_check_mark: | :white_check_mark: | :x: | :x: |
| XfxCardView | :white_check_mark: | :white_check_mark: | :x: | :x: |
In your MainActivity, initialize XfxControls just before initializing Xamarin Forms
XfxControls.Init();
global::Xamarin.Forms.Forms.Init(this, bundle);note: XfxEntry and XfxComboBox REQUIRES your app to use an AppCompat theme.
In your AppDelegate, initialize XfxControls just before initializing Xamarin Forms
XfxControls.Init();
global::Xamarin.Forms.Forms.Init();Declaration is exactly the same as a Xamarin.Forms.Entry, with some added properties
When the ErrorText property is set, the ErrorText will display, otherwise if it is null or empty, it's removed.
The XfxComboBox extends the XfxEntry and therefore also includes the ErrorText property.
Beyond that there is an ItemsSource property, SelectedItem property, and a SortingAlgorithm property.
The first two are pretty self explanitory, but here's an example of how you can set the SortingAlgorithm
public class MyViewModel : INotifyPropertyChanged
{
public Func, ICollection> SortingAlgorithm { get; } = (text, values) => values
.Where(x => x.StartsWith(text, StringComparison.CurrentCultureIgnoreCase)))
.OrderBy(x => x)
.ToList();
}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse fringilla turpis turpis, id lobortis dolor vestibulum condimentum.
Licensed MIT, please review the license file.
暂无开放 Issues,或尚未同步最近议题。