mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-14 13:16:36 +08:00
feat: add TextBox Demo, fix RadioButton demo. Add Borderless Theme.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
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" d:DesignHeight="450"
|
||||
d:DesignWidth="800" mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="10" Spacing="5">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center" Classes="H4"
|
||||
@@ -102,6 +102,12 @@
|
||||
<TextBlock>Shadow</TextBlock>
|
||||
</Border>
|
||||
</Grid>
|
||||
<StackPanel Spacing="20">
|
||||
<TextBox InnerLeftContent="http://" InnerRightContent=".com" />
|
||||
<TextBox
|
||||
Classes="revealPasswordButton" PasswordChar="*"
|
||||
Text="Avalonia" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
<TextBlock Text="Radio Button as Button" />
|
||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton Classes="Small" >小1</RadioButton>
|
||||
<RadioButton Classes="Small" >小2</RadioButton>
|
||||
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小1</RadioButton>
|
||||
<RadioButton Classes="Small" Theme="{DynamicResource ButtonRadioButton}">小2</RadioButton>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border HorizontalAlignment="Left" Theme="{StaticResource RadioButtonGroupBorder}">
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
<TextBox
|
||||
Width="300" Classes="revealPasswordButton"
|
||||
PasswordChar="*" />
|
||||
<TextBox
|
||||
Width="500" InnerLeftContent="http://"
|
||||
InnerRightContent=".com"
|
||||
Theme="{StaticResource BorderlessTextBox}" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Avalonia;
|
||||
using System;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Semi.Avalonia.Demo
|
||||
{
|
||||
@@ -10,6 +11,16 @@ namespace Semi.Avalonia.Demo
|
||||
// yet and stuff might break.
|
||||
[STAThread]
|
||||
public static void Main(string[] args) => BuildAvaloniaApp()
|
||||
.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = new[]
|
||||
{
|
||||
new FontFallback
|
||||
{
|
||||
FontFamily = new FontFamily("Microsoft YaHei")
|
||||
}
|
||||
}
|
||||
})
|
||||
.StartWithClassicDesktopLifetime(args);
|
||||
|
||||
// Avalonia configuration, don't remove; also used by visual designer.
|
||||
|
||||
Reference in New Issue
Block a user