功能完善
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
<wpf:BiaWindow
|
||||
x:Class="ShrlAlgo.Addin.Test.FluentWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ShrlAlgo.Addin.Test"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ws="https://schemas.elecho.dev/wpfsuite"
|
||||
xmlns:wsfd="https://schemas.elecho.dev/wpfsuite-design/fluent"
|
||||
xmlns:wpf="https://github.com/WPFDark"
|
||||
Title="BiaWindow"
|
||||
Width="800"
|
||||
Height="450"
|
||||
Style="{DynamicResource WPFDarkStyle}"
|
||||
FontFamily="Segoe UI"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<wpf:ThemesDictionary/>
|
||||
<wpf:ControlsDictionary/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="{x:Type wpf:BiaTextBox}">
|
||||
<Setter Property="Margin" Value="0,4,0,0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type wpf:BiaComboBox}">
|
||||
<Setter Property="Margin" Value="0,4,0,0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type wpf:BiaButton}">
|
||||
<Setter Property="Margin" Value="0,4,0,0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
</Style>
|
||||
<DataTemplate x:Key="ListItemTemplateStyle">
|
||||
<wpf:BiaTextBlock Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ItemIndexTemplateStyle">
|
||||
<wpf:BiaTextBlock Text="{Binding Index}" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ItemNameTemplateStyle">
|
||||
<wpf:BiaTextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<StackPanel>
|
||||
<TextBox Width="200" />
|
||||
<TextBlock Text="Test" />
|
||||
<PasswordBox />
|
||||
<!-- Fix for XDG0066: Ensure the BiaColorPicker control is properly initialized -->
|
||||
<wpf:BiaColorPicker />
|
||||
<Button Content="按钮" />
|
||||
<ComboBox>
|
||||
<ComboBoxItem Content="First" />
|
||||
<ComboBoxItem Content="Second" />
|
||||
<ComboBoxItem Content="Third" />
|
||||
</ComboBox>
|
||||
<CheckBox Content="CheckBox" />
|
||||
<TabControl>
|
||||
<TabItem Header="First" />
|
||||
<TabItem Header="Second" />
|
||||
<TabItem Header="Third" />
|
||||
</TabControl>
|
||||
<ListBox>
|
||||
<ListBoxItem Content="First" />
|
||||
<ListBoxItem Content="Second" />
|
||||
<ListBoxItem Content="Third" />
|
||||
</ListBox>
|
||||
<ListView Width="200"
|
||||
Height="200"
|
||||
Margin="0,4,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top" d:ItemsSource="{d:SampleData ItemCount=5}"
|
||||
ItemsSource="{Binding Areas, Mode=OneTime}">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="50"
|
||||
CellTemplate="{StaticResource ItemIndexTemplateStyle}"
|
||||
Header="番号" />
|
||||
<GridViewColumn Width="120"
|
||||
CellTemplate="{StaticResource ItemNameTemplateStyle}"
|
||||
Header="名前" />
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</wpf:BiaWindow>
|
||||
@@ -1,49 +0,0 @@
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
|
||||
//using WPFluent.Appearance;
|
||||
|
||||
|
||||
namespace ShrlAlgo.Addin.Test;
|
||||
/// <summary>
|
||||
/// FluentWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class FluentWindow
|
||||
{
|
||||
public FluentWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
//var res = this.Resources;
|
||||
//var style = this.Style;
|
||||
//Debug.WriteLine(style);
|
||||
//foreach (var item in res.MergedDictionaries)
|
||||
//{
|
||||
// foreach (var k in item.Keys)
|
||||
// {
|
||||
// Debug.WriteLine(k);
|
||||
// }
|
||||
//}
|
||||
|
||||
//ThemeManager.ChangeAppTheme(this);
|
||||
//ThemeManager.Changed -= ApplicationThemeManager_Changed;
|
||||
//ThemeManager.Changed += ApplicationThemeManager_Changed;
|
||||
}
|
||||
//private void ApplicationThemeManager_Changed(ThemeType currentApplicationTheme, Color systemAccent)
|
||||
//{
|
||||
// ThemeManager.ChangeAppTheme(this);
|
||||
//}
|
||||
|
||||
//private void Button_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// if (ThemeManager.GetAppTheme() == ThemeType.Light)
|
||||
// {
|
||||
// ThemeManager.ChangeAppTheme(ThemeType.Dark);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ThemeManager.ChangeAppTheme(ThemeType.Light);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
Reference in New Issue
Block a user