From eca9bd13d1f06f04f4561035c7beccbdc1fe58ae Mon Sep 17 00:00:00 2001 From: laggage <1634205628@qq.com> Date: Wed, 29 Jan 2020 00:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WinPowerHelper.Wpf/MainWindow.xaml | 30 +- .../Styles/Controls.ComboBox.xaml | 269 ++++++++++++++++++ WinPowerHelper.Wpf/Styles/Controls.xaml | 1 + WinPowerHelper.Wpf/Views/TimerControl.xaml | 34 +-- 4 files changed, 301 insertions(+), 33 deletions(-) create mode 100644 WinPowerHelper.Wpf/Styles/Controls.ComboBox.xaml diff --git a/WinPowerHelper.Wpf/MainWindow.xaml b/WinPowerHelper.Wpf/MainWindow.xaml index 0eb722e..2c4ce58 100644 --- a/WinPowerHelper.Wpf/MainWindow.xaml +++ b/WinPowerHelper.Wpf/MainWindow.xaml @@ -9,12 +9,13 @@ mc:Ignorable="d" DataContext="{StaticResource MainViewModel}" Title="{Binding AppTitle}" - MinHeight="240" MinWidth="420" Width="500" Height="240" + MinHeight="240" MinWidth="420" Width="500" Height="250" MaxHeight="400" MaxWidth="680" ResizeMode="CanMinimize"> + @@ -46,30 +47,39 @@ Command="{Binding SetIntervalToZeroCmd}">set to zero - + + - - + + Style="{StaticResource ComboBox}" + SelectedValue="{Binding SelectedPowerOption, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged, FallbackValue=Sleep}" + IsEditable="False" + ItemContainerStyle="{StaticResource ComboBoxItem.Accent}"> - + - - - -