优化UI, 提取公共样式

This commit is contained in:
BookerLiu
2023-04-21 22:33:05 +08:00
parent 2e1cc7ee3c
commit ece8787b8e
11 changed files with 47 additions and 32 deletions

View File

@@ -186,7 +186,7 @@
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Tag="{Binding}">
<TextBox Text="{Binding Path=MenuName, Mode=TwoWay}"
<TextBox Style="{StaticResource MyTextBoxStyle}" Text="{Binding Path=MenuName, Mode=TwoWay}"
HorizontalAlignment="Left"
Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBox},AncestorLevel=1},Path=Tag, Mode=TwoWay, Converter={StaticResource MenuWidthConvert}, ConverterParameter=35}"
FontSize="16"