|
5 | 5 | xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
6 | 6 | xmlns:myControls="clr-namespace:Sql_Widget.Controls" |
7 | 7 |
|
8 | | - WindowStyle="None" SizeToContent="WidthAndHeight" ResizeMode="NoResize" |
9 | | - FontSize="15" ShowInTaskbar="False" SizeChanged="Window_SizeChanged" |
10 | | - TextElement.Foreground="{DynamicResource MaterialDesignBody}" Background="{DynamicResource MaterialDesignPaper}" |
| 8 | + SizeToContent="WidthAndHeight" ResizeMode="NoResize" FontSize="15" ShowInTaskbar="False" |
| 9 | + WindowStyle="None" AllowsTransparency="True" Background="Transparent" |
| 10 | + SizeChanged="Window_SizeChanged" |
| 11 | + TextElement.Foreground="{DynamicResource MaterialDesignBody}" |
11 | 12 | FontFamily="{DynamicResource MaterialDesignFont}" Topmost="{Binding TopMost}"> |
12 | 13 | <Window.InputBindings> |
13 | 14 | <KeyBinding Key="F1" Command="{Binding HelpCommand}" /> |
14 | 15 | <KeyBinding Key="F5" Command="{Binding ExecuteCommand}" /> |
15 | 16 | <KeyBinding Key="Tab" Modifiers="Ctrl" Command="{Binding ChangeTab}" CommandParameter="{Binding ElementName=Tabs}" /> |
16 | 17 | </Window.InputBindings> |
17 | | - <Expander ExpandDirection="Left" Expanded="Expander_Expanded" Collapsed="Expander_Collapsed" IsExpanded="True"> |
18 | | - <Expander.Header> |
19 | | - <ToggleButton Style="{StaticResource MaterialDesignActionToggleButton}" ToolTip="Always on Top" IsChecked="{Binding TopMost}"> |
20 | | - <materialDesign:PackIcon Kind="Database" Width="24" Height="24"/> |
21 | | - </ToggleButton> |
22 | | - </Expander.Header> |
23 | | - <StackPanel> |
24 | | - <myControls:DBandTableControl x:Name="DBSelector"/> |
25 | | - <TabControl Name="Tabs" SelectedItem="{Binding SelectedTab,Mode=OneWayToSource}" Background="{DynamicResource MaterialDesignPaper}"> |
26 | | - <TabItem Header="Query" IsTabStop="False"> |
27 | | - <TextBox Height="290" MaxWidth="470" Margin="5" FontSize="20" Text="{Binding QueryValue,UpdateSourceTrigger=PropertyChanged}" |
| 18 | + <Border Background="{DynamicResource MaterialDesignPaper}" CornerRadius="20,0,0,20" Padding="6"> |
| 19 | + <Expander ExpandDirection="Left" Expanded="Expander_Expanded" Collapsed="Expander_Collapsed" IsExpanded="True"> |
| 20 | + <Expander.Header> |
| 21 | + <ToggleButton Style="{StaticResource MaterialDesignActionToggleButton}" ToolTip="Always on Top" IsChecked="{Binding TopMost}"> |
| 22 | + <materialDesign:PackIcon Kind="Database" Width="24" Height="24"/> |
| 23 | + </ToggleButton> |
| 24 | + </Expander.Header> |
| 25 | + <StackPanel> |
| 26 | + <myControls:DBandTableControl x:Name="DBSelector"/> |
| 27 | + <TabControl Name="Tabs" SelectedItem="{Binding SelectedTab,Mode=OneWayToSource}" Background="{DynamicResource MaterialDesignPaper}"> |
| 28 | + <TabItem Header="Query" IsTabStop="False"> |
| 29 | + <TextBox Height="290" MaxWidth="470" Margin="5" FontSize="20" Text="{Binding QueryValue,UpdateSourceTrigger=PropertyChanged}" |
28 | 30 | IsEnabled="{Binding QueryEnabled,Mode=OneWay}" HorizontalAlignment="Stretch" TextWrapping="Wrap" AcceptsReturn="True" |
29 | 31 | Background="{DynamicResource MaterialDesignPaper}" Foreground="{DynamicResource MaterialDesignBody}"/> |
30 | | - </TabItem> |
31 | | - <TabItem Header="SELECT" IsTabStop="False"> |
32 | | - <StackPanel Orientation="Horizontal" Height="300"> |
33 | | - <myControls:SelectControl /> |
34 | | - <myControls:WhereControl /> |
35 | | - </StackPanel> |
36 | | - </TabItem> |
37 | | - <!--<TabItem Header="UPDATE" IsTabStop="False" Visibility="Collapsed" /> |
| 32 | + </TabItem> |
| 33 | + <TabItem Header="SELECT" IsTabStop="False"> |
| 34 | + <StackPanel Orientation="Horizontal" Height="300"> |
| 35 | + <myControls:SelectControl /> |
| 36 | + <myControls:WhereControl /> |
| 37 | + </StackPanel> |
| 38 | + </TabItem> |
| 39 | + <!--<TabItem Header="UPDATE" IsTabStop="False" Visibility="Collapsed" /> |
38 | 40 | <TabItem Header="INSERT" IsTabStop="False" Visibility="Collapsed"/> |
39 | 41 | <TabItem Header="DELETE" IsTabStop="False" Visibility="Collapsed"/>--> |
40 | | - <TabItem Header="History" IsTabStop="False"> |
41 | | - <myControls:HistoryControl Height="300"/> |
42 | | - </TabItem> |
43 | | - <!--<TabItem Header="Favorite" IsTabStop="False" Visibility="Collapsed"/>--> |
44 | | - </TabControl> |
45 | | - <myControls:ButtonsControl/> |
46 | | - </StackPanel> |
47 | | - </Expander> |
| 42 | + <TabItem Header="History" IsTabStop="False"> |
| 43 | + <myControls:HistoryControl Height="300"/> |
| 44 | + </TabItem> |
| 45 | + <!--<TabItem Header="Favorite" IsTabStop="False" Visibility="Collapsed"/>--> |
| 46 | + </TabControl> |
| 47 | + <myControls:ButtonsControl/> |
| 48 | + </StackPanel> |
| 49 | + </Expander> |
| 50 | + </Border> |
48 | 51 | </Window> |
0 commit comments