From 5a89b402444b0cf12ec71ef1ba319edb27973cb3 Mon Sep 17 00:00:00 2001 From: liufei Date: Wed, 26 Jan 2022 10:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BF=AE=E6=94=B9=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=9B=BE=E6=A0=87=E6=97=B6=E7=9A=84=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=8F=8A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PannelCard/LeftCardControl.xaml | 109 ++++++++++-------- .../PannelCard/LeftCardControl.xaml.cs | 101 ++++++++++++++-- MainWindow.xaml | 2 + MainWindow.xaml.cs | 11 +- ViewModel/MenuInfo.cs | 4 +- 5 files changed, 164 insertions(+), 63 deletions(-) diff --git a/Control/UserControls/PannelCard/LeftCardControl.xaml b/Control/UserControls/PannelCard/LeftCardControl.xaml index 1f6d242..911b851 100644 --- a/Control/UserControls/PannelCard/LeftCardControl.xaml +++ b/Control/UserControls/PannelCard/LeftCardControl.xaml @@ -22,6 +22,7 @@ + @@ -42,24 +43,34 @@ + + + + - - - - - + + + + + - - - - - - - - @@ -87,14 +98,14 @@ + Padding="2,3,0,2" + ItemsSource="{Binding MenuList}" + Tag="{Binding AppConfig.MenuCardWidth}" + BorderThickness="0" Foreground="{x:Null}" + SelectedIndex="{Binding AppConfig.SelectedMenuIndex}" + VirtualizingPanel.VirtualizationMode="Recycling" + SelectionChanged="Menu_SelectionChanged" + > @@ -123,36 +134,36 @@ - + HorizontalAlignment="Left" + Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}" + FontSize="16" + Height="28" + VerticalAlignment="Center" + TextAlignment="Left" + LostFocus="LostFocusOrEnterDown" + KeyDown="LostFocusOrEnterDown" + Tag="{Binding}" + Padding="2" + BorderThickness="0" + IsVisibleChanged="MenuEditWhenVisibilityChanged" + Visibility="{Binding MenuEdit}"/> +