feat: move validation errors demo to individual page.
This commit is contained in:
parent
127bd1446a
commit
5f7e1510f1
61
demo/Semi.Avalonia.Demo/Pages/DataValidationErrorsDemo.axaml
Normal file
61
demo/Semi.Avalonia.Demo/Pages/DataValidationErrorsDemo.axaml
Normal file
@ -0,0 +1,61 @@
|
||||
<UserControl
|
||||
x:Class="Semi.Avalonia.Demo.Pages.DataValidationErrorsDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:system="clr-namespace:System;assembly=netstandard"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<AutoCompleteBox Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</AutoCompleteBox>
|
||||
<ButtonSpinner Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</ButtonSpinner>
|
||||
<CalendarDatePicker Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</CalendarDatePicker>
|
||||
<ComboBox Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</ComboBox>
|
||||
<DatePicker Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</DatePicker>
|
||||
<NumericUpDown Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</NumericUpDown>
|
||||
<Slider Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</Slider>
|
||||
<TimePicker Width="300">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</TimePicker>
|
||||
<TextBox
|
||||
Width="300"
|
||||
InnerLeftContent="http://"
|
||||
InnerRightContent=".com">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
</UserControl>
|
@ -0,0 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class DataValidationErrorsDemo : UserControl
|
||||
{
|
||||
public DataValidationErrorsDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
@ -42,23 +42,6 @@
|
||||
InnerLeftContent="http://"
|
||||
InnerRightContent=".com"
|
||||
IsEnabled="False" />
|
||||
<TextBox
|
||||
Width="500"
|
||||
InnerLeftContent="http://"
|
||||
InnerRightContent=".com">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</TextBox>
|
||||
<TextBox
|
||||
Width="500"
|
||||
Classes="Bordered"
|
||||
InnerLeftContent="http://"
|
||||
InnerRightContent=".com">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
@ -105,6 +105,9 @@
|
||||
<TabItem Header="ComboBox">
|
||||
<pages:ComboBoxDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="DataValidationErrors">
|
||||
<pages:DataValidationErrorsDemo />
|
||||
</TabItem>
|
||||
<TabItem Header="DataGrid">
|
||||
<pages:DataGridDemo />
|
||||
</TabItem>
|
||||
|
Loading…
x
Reference in New Issue
Block a user