|
27 | 27 | <Separator Margin="12,4"/> |
28 | 28 | <Button Content="Save .sqlplan" Click="SavePlan_Click" Height="28" Padding="8,0" |
29 | 29 | ToolTip="Save plan as .sqlplan file"/> |
30 | | - <Separator Margin="12,4"/> |
31 | | - <TextBlock x:Name="StatementLabel" Text="Statement:" VerticalAlignment="Center" |
32 | | - Foreground="{DynamicResource ForegroundMutedBrush}" Margin="0,0,6,0" |
33 | | - Visibility="Collapsed"/> |
34 | | - <ComboBox x:Name="StatementSelector" MinWidth="200" Height="28" |
35 | | - SelectionChanged="StatementSelector_Changed" |
36 | | - Visibility="Collapsed"/> |
| 30 | + <Separator x:Name="StatementsButtonSeparator" Margin="12,4" Visibility="Collapsed"/> |
| 31 | + <Button x:Name="StatementsButton" Content="Statements" Click="ToggleStatements_Click" |
| 32 | + Height="28" Padding="8,0" Visibility="Collapsed" |
| 33 | + ToolTip="Show/hide statement list"/> |
37 | 34 | </StackPanel> |
38 | 35 | <TextBlock x:Name="CostText" DockPanel.Dock="Right" VerticalAlignment="Center" |
39 | 36 | HorizontalAlignment="Right" |
|
92 | 89 | Padding="8,4"/> |
93 | 90 | </Expander> |
94 | 91 |
|
95 | | - <!-- Plan Canvas + Properties Panel --> |
| 92 | + <!-- Statements Panel + Plan Canvas + Properties Panel --> |
96 | 93 | <Grid Grid.Row="4"> |
97 | 94 | <Grid.ColumnDefinitions> |
| 95 | + <!-- Col 0: Statements Panel (hidden by default) --> |
| 96 | + <ColumnDefinition x:Name="StatementsColumn" Width="0"/> |
| 97 | + <!-- Col 1: Statements Splitter (hidden by default) --> |
| 98 | + <ColumnDefinition x:Name="StatementsSplitterColumn" Width="0"/> |
| 99 | + <!-- Col 2: Plan Canvas --> |
98 | 100 | <ColumnDefinition Width="*"/> |
| 101 | + <!-- Col 3: Properties Splitter (hidden by default) --> |
99 | 102 | <ColumnDefinition Width="Auto"/> |
| 103 | + <!-- Col 4: Properties Panel (hidden by default) --> |
100 | 104 | <ColumnDefinition x:Name="PropertiesColumn" Width="0"/> |
101 | 105 | </Grid.ColumnDefinitions> |
102 | 106 |
|
| 107 | + <!-- Statements Panel --> |
| 108 | + <Border x:Name="StatementsPanel" Grid.Column="0" |
| 109 | + Background="{DynamicResource BackgroundDarkBrush}" |
| 110 | + BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,1,0" |
| 111 | + Visibility="Collapsed"> |
| 112 | + <DockPanel> |
| 113 | + <!-- Header --> |
| 114 | + <Border DockPanel.Dock="Top" Padding="10,8" |
| 115 | + Background="{DynamicResource BackgroundBrush}" |
| 116 | + BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1"> |
| 117 | + <DockPanel> |
| 118 | + <Button DockPanel.Dock="Right" Content="✕" Click="CloseStatements_Click" |
| 119 | + Width="24" Height="24" Padding="0" FontSize="12" |
| 120 | + VerticalAlignment="Center" ToolTip="Close Statements" |
| 121 | + Background="Transparent" BorderThickness="0" |
| 122 | + Foreground="{DynamicResource ForegroundMutedBrush}"/> |
| 123 | + <TextBlock x:Name="StatementsHeader" Text="Statements" |
| 124 | + FontWeight="SemiBold" FontSize="13" |
| 125 | + Foreground="{DynamicResource ForegroundBrush}" |
| 126 | + VerticalAlignment="Center"/> |
| 127 | + </DockPanel> |
| 128 | + </Border> |
| 129 | + |
| 130 | + <!-- Statement Grid --> |
| 131 | + <DataGrid x:Name="StatementsGrid" |
| 132 | + AutoGenerateColumns="False" |
| 133 | + CanUserSortColumns="True" |
| 134 | + CanUserReorderColumns="False" |
| 135 | + CanUserResizeColumns="True" |
| 136 | + IsReadOnly="True" |
| 137 | + SelectionMode="Single" |
| 138 | + GridLinesVisibility="Horizontal" |
| 139 | + HeadersVisibility="Column" |
| 140 | + SelectionChanged="StatementsGrid_SelectionChanged" |
| 141 | + FontSize="11" |
| 142 | + Background="{DynamicResource BackgroundDarkBrush}" |
| 143 | + BorderThickness="0"/> |
| 144 | + </DockPanel> |
| 145 | + </Border> |
| 146 | + |
| 147 | + <!-- Statements Splitter --> |
| 148 | + <GridSplitter x:Name="StatementsSplitter" Grid.Column="1" Width="5" |
| 149 | + HorizontalAlignment="Center" VerticalAlignment="Stretch" |
| 150 | + Background="{DynamicResource BorderBrush}" |
| 151 | + Visibility="Collapsed"/> |
| 152 | + |
103 | 153 | <!-- Plan Canvas --> |
104 | | - <ScrollViewer Grid.Column="0" x:Name="PlanScrollViewer" |
| 154 | + <ScrollViewer Grid.Column="2" x:Name="PlanScrollViewer" |
105 | 155 | HorizontalScrollBarVisibility="Auto" |
106 | 156 | VerticalScrollBarVisibility="Auto" |
107 | 157 | Background="{DynamicResource BackgroundBrush}" |
108 | | - PreviewMouseWheel="PlanScrollViewer_PreviewMouseWheel"> |
| 158 | + PreviewMouseWheel="PlanScrollViewer_PreviewMouseWheel" |
| 159 | + PreviewMouseLeftButtonDown="PlanScrollViewer_PreviewMouseLeftButtonDown" |
| 160 | + PreviewMouseMove="PlanScrollViewer_PreviewMouseMove" |
| 161 | + PreviewMouseLeftButtonUp="PlanScrollViewer_PreviewMouseLeftButtonUp"> |
109 | 162 | <Canvas x:Name="PlanCanvas" ClipToBounds="False"> |
110 | 163 | <Canvas.LayoutTransform> |
111 | 164 | <ScaleTransform x:Name="ZoomTransform" ScaleX="1" ScaleY="1"/> |
|
114 | 167 | </ScrollViewer> |
115 | 168 |
|
116 | 169 | <!-- Empty State --> |
117 | | - <StackPanel x:Name="EmptyState" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center"> |
| 170 | + <StackPanel x:Name="EmptyState" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Center"> |
118 | 171 | <TextBlock Text="No Plan Loaded" FontSize="20" FontWeight="Light" |
119 | 172 | Foreground="{DynamicResource ForegroundMutedBrush}" HorizontalAlignment="Center"/> |
120 | 173 | <TextBlock Text="Right-click a query row and choose 'View Plan' to display an execution plan here" |
121 | 174 | FontSize="13" Foreground="{DynamicResource ForegroundMutedBrush}" |
122 | 175 | HorizontalAlignment="Center" Margin="0,8,0,0"/> |
123 | 176 | </StackPanel> |
124 | 177 |
|
125 | | - <!-- GridSplitter --> |
126 | | - <GridSplitter x:Name="PropertiesSplitter" Grid.Column="1" Width="5" |
| 178 | + <!-- Properties Splitter --> |
| 179 | + <GridSplitter x:Name="PropertiesSplitter" Grid.Column="3" Width="5" |
127 | 180 | HorizontalAlignment="Center" VerticalAlignment="Stretch" |
128 | 181 | Background="{DynamicResource BorderBrush}" |
129 | 182 | Visibility="Collapsed"/> |
130 | 183 |
|
131 | 184 | <!-- Properties Panel --> |
132 | | - <Border x:Name="PropertiesPanel" Grid.Column="2" |
| 185 | + <Border x:Name="PropertiesPanel" Grid.Column="4" |
133 | 186 | Background="{DynamicResource BackgroundDarkBrush}" |
134 | 187 | BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,0,0" |
135 | 188 | Visibility="Collapsed"> |
|
0 commit comments