2025-08-12 23:08:54 +08:00
|
|
|
<Window
|
|
|
|
|
Height="600"
|
|
|
|
|
Icon="/Resources/Images/SyminUI.png"
|
|
|
|
|
Title="Custom Control Test"
|
|
|
|
|
Width="800"
|
|
|
|
|
d:Height="1200"
|
|
|
|
|
d:SizeToContent="WidthAndHeight"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
x:Class="NeuWPFTest.ControlTestWindow"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:lu="https://github.com/ShrlAlgo/NeuWPF"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
|
<!-- 主窗口背景色,这是拟态风格的基础 -->
|
2025-07-31 20:12:24 +08:00
|
|
|
<Window.Resources>
|
2025-08-12 23:08:54 +08:00
|
|
|
<!--<ResourceDictionary>
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/NeuWPFTest;component/ButtonStyles.xaml" />
|
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
</ResourceDictionary>-->
|
2025-07-31 20:12:24 +08:00
|
|
|
</Window.Resources>
|
2025-08-12 23:08:54 +08:00
|
|
|
<!--<lu:WindowAssist.TitleBar>
|
2025-07-31 20:12:24 +08:00
|
|
|
<Menu>
|
|
|
|
|
<MenuItem Header="Help">
|
|
|
|
|
<MenuItem Header="About" />
|
|
|
|
|
</MenuItem>
|
|
|
|
|
</Menu>
|
2025-08-12 23:08:54 +08:00
|
|
|
</lu:WindowAssist.TitleBar>-->
|
2025-07-31 20:12:24 +08:00
|
|
|
<Grid>
|
2025-08-12 23:08:54 +08:00
|
|
|
<ScrollViewer
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
|
Grid.Row="1">
|
|
|
|
|
<lu:StackPanel Background="{DynamicResource BackgroundLayoutBrush}" Spacing="10">
|
|
|
|
|
<lu:PropertyField
|
|
|
|
|
Grid.Row="0"
|
|
|
|
|
Margin="6,0"
|
|
|
|
|
PropertyName="属性"
|
|
|
|
|
PropertyValue="123" />
|
|
|
|
|
<lu:PropertyField
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Margin="6,0"
|
|
|
|
|
PropertyName="属性x"
|
|
|
|
|
PropertyValue="154" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TreeView Grid.Row="3" x:Name="OldTreeView">
|
2025-07-31 20:12:24 +08:00
|
|
|
<TreeView.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<TextBlock Text="{Binding ItemName}" />
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</TreeView.ItemTemplate>
|
|
|
|
|
</TreeView>
|
|
|
|
|
|
|
|
|
|
<TreeViewItem Grid.Row="4" Header="TreeItem" />
|
2025-08-12 23:08:54 +08:00
|
|
|
<ItemsControl Grid.Row="5" x:Name="testItemsControl" />
|
|
|
|
|
<lu:StackPanel
|
|
|
|
|
Grid.Row="6"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Margin="20"
|
|
|
|
|
Spacing="100">
|
|
|
|
|
<Button
|
|
|
|
|
Content="Button"
|
|
|
|
|
Height="100"
|
|
|
|
|
Style="{StaticResource NeuMorphicButtonStyle}"
|
|
|
|
|
Width="200" />
|
|
|
|
|
</lu:StackPanel>
|
|
|
|
|
</lu:StackPanel>
|
2025-07-31 20:12:24 +08:00
|
|
|
</ScrollViewer>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|