Skip to content

Commit

Permalink
docs: 更新测试项目内容
Browse files Browse the repository at this point in the history
  • Loading branch information
SlimeNull committed Apr 14, 2024
1 parent 6049247 commit 860c91f
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 58 deletions.
3 changes: 2 additions & 1 deletion WpfTest/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Frame Name="AppFrame"/>
<Frame Name="AppFrame"
NavigationUIVisibility="Hidden"/>
</DockPanel>
</Window>
95 changes: 53 additions & 42 deletions WpfTest/Tests/ImageTestPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,63 @@
xmlns:ws="https://github.com/OrgEleCho/EleCho.WpfSuite"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:ImageTestPage}"
Title="ImageTestPage">

<ws:ScrollViewer>
<ws:StackPanel Spacing="12"
Margin="48">
<ws:Image Source="/Assets/TestImage1.jpg"
Width="{Binding ElementName=WidthSlider,Path=Value}"
CornerRadius="{Binding ElementName=CornerRadiusSlider,Path=Value,Converter={x:Static ws:NumberToCornerRadiusConverter.Instance}}"
Stretch="{Binding ElementName=StretchModeSelector,Path=SelectedItem}"
BorderBrush="Pink"
BorderThickness="{Binding ElementName=BorderThicknessSlider,Path=Value}"/>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="Width:"/>
<Slider Width="200"
Value="100"
Minimum="0"
Maximum="100"
Name="WidthSlider"/>
<Grid Margin="28 12 28 28">
<ws:StackPanel Spacing="12">
<TextBlock Text="Image Test"
FontSize="26"
Margin="0 0 0 12"/>
<ws:Image Source="/Assets/TestImage1.jpg"
HorizontalAlignment="Left"
Width="{Binding ElementName=WidthSlider,Path=Value}"
CornerRadius="{Binding ElementName=CornerRadiusSlider,Path=Value,Converter={x:Static ws:NumberToCornerRadiusConverter.Instance}}"
Stretch="{Binding ElementName=StretchModeSelector,Path=SelectedItem}"
BorderBrush="Pink"
BorderThickness="{Binding ElementName=BorderThicknessSlider,Path=Value}"/>
<GroupBox Header="Options"
Padding="12">
<ws:StackPanel Spacing="8">
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="Width:"/>
<Slider Width="200"
Value="100"
Minimum="10"
Maximum="256"
Name="WidthSlider"/>
</ws:StackPanel>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="CornerRadius:"/>
<Slider Width="200"
Value="10"
Maximum="50"
Minimum="0"
Name="CornerRadiusSlider"/>
</ws:StackPanel>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="BorderThickness:"/>
<Slider Width="200"
Value="5"
Minimum="0"
Maximum="50"
Name="BorderThicknessSlider"/>
</ws:StackPanel>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="StretchMode:"/>
<ComboBox ItemsSource="{Binding StretchModes}"
SelectedIndex="0"
Name="StretchModeSelector"/>
</ws:StackPanel>
</ws:StackPanel>
</GroupBox>
</ws:StackPanel>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="CornerRadius:"/>
<Slider Width="200"
Value="10"
Maximum="50"
Minimum="0"
Name="CornerRadiusSlider"/>
</ws:StackPanel>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="BorderThickness:"/>
<Slider Width="200"
Value="10"
Maximum="50"
Minimum="0"
Name="BorderThicknessSlider"/>
</ws:StackPanel>
<ws:StackPanel Orientation="Horizontal"
Spacing="8">
<TextBlock Text="StretchMode:"/>
<ComboBox ItemsSource="{Binding StretchModes}"
SelectedIndex="0"
Name="StretchModeSelector"/>
</ws:StackPanel>
</ws:StackPanel>
</Grid>
</ws:ScrollViewer>
</Page>
29 changes: 14 additions & 15 deletions WpfTest/Tests/TextBoxTestPage.xaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Page x:Class="WpfTest.Tests.TextBoxTestPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WpfTest.Tests"
xmlns:ws="https://github.com/OrgEleCho/EleCho.WpfSuite"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:Background="White"
d:DataContext="{d:DesignInstance Type=local:TextBoxTestPage}"
Title="TextBoxTestPage">

<Grid Margin="28">
<Grid Margin="28 12 28 28">
<ws:StackPanel Spacing="12">
<TextBlock Text="TextBox Test"
FontSize="26"
Expand All @@ -21,17 +21,16 @@
<ws:TextBox Padding="5" Placeholder="{Binding ElementName=PlaceHolderBox,Path=Text}"/>
</StackPanel>

<StackPanel>
<TextBlock Text="PasswordBox:"/>
<PasswordBox Padding="5" />
</StackPanel>

<ws:StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="Place holder:"/>
<TextBox Name="PlaceHolderBox"
MinWidth="200"
Padding="10"/>
</ws:StackPanel>
<GroupBox Header="Options"
Padding="12">
<ws:StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="Place holder:"/>
<TextBox Name="PlaceHolderBox"
Text="Input something"
MinWidth="200"
Padding="5"/>
</ws:StackPanel>
</GroupBox>
</ws:StackPanel>
</Grid>
</Page>

0 comments on commit 860c91f

Please sign in to comment.