Skip to content

Commit 7f551d0

Browse files
committed
extract Workspaces as a separate component
1 parent 87deab5 commit 7f551d0

File tree

10 files changed

+481
-247
lines changed

10 files changed

+481
-247
lines changed

sources/RevitDBExplorer/MainWindow.xaml

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
77
xmlns:componentQueryEditor="clr-namespace:RevitDBExplorer.UIComponents.QueryEditor"
88
xmlns:componentQueryVisualization="clr-namespace:RevitDBExplorer.UIComponents.QueryVisualization"
9-
xmlns:componentBusyIndicator="clr-namespace:RevitDBExplorer.UIComponents.BusyIndicator"
10-
xmlns:componentList="clr-namespace:RevitDBExplorer.UIComponents.List"
11-
xmlns:componentExplorerTree="clr-namespace:RevitDBExplorer.UIComponents.Trees.Explorer"
12-
xmlns:componentUtilityTree="clr-namespace:RevitDBExplorer.UIComponents.Trees.Utility"
13-
xmlns:componentCAndC="clr-namespace:RevitDBExplorer.UIComponents.CommandAndControl"
14-
xmlns:componentScripting="clr-namespace:RevitDBExplorer.UIComponents.Scripting"
9+
xmlns:componentBusyIndicator="clr-namespace:RevitDBExplorer.UIComponents.BusyIndicator"
1510
xmlns:componentBreadcrumbs="clr-namespace:RevitDBExplorer.UIComponents.Breadcrumbs"
11+
xmlns:componentWorkspaces="clr-namespace:RevitDBExplorer.UIComponents.Workspaces"
1612
xmlns:converters="clr-namespace:RevitDBExplorer.WPF.Converters"
1713
xmlns:ext="clr-namespace:RevitDBExplorer.WPF.MarkupExtensions"
1814
xmlns:wpf="clr-namespace:RevitDBExplorer.WPF"
@@ -54,20 +50,15 @@
5450
<RowDefinition Height="0" />
5551
</Grid.RowDefinitions>
5652

57-
<Grid Margin="2 2 2 0" >
58-
<Grid.ColumnDefinitions>
59-
<ColumnDefinition Width="{ext:SettingBinding FirstColumnWidth}" MinWidth="100" x:Name="cFirstColumnDefinition" />
60-
<ColumnDefinition Width="auto" />
61-
<ColumnDefinition Width="*" MinWidth="100"/>
62-
</Grid.ColumnDefinitions>
53+
<Grid Margin="2 2 2 0" >
6354
<Grid.RowDefinitions>
6455
<RowDefinition Height="auto"/>
6556
<RowDefinition Height="auto"/>
6657
<RowDefinition Height="*" />
6758
<RowDefinition Height="21"/>
6859
</Grid.RowDefinitions>
6960

70-
<UniformGrid Grid.ColumnSpan="3" Columns="12" Margin="0 0 0 2" >
61+
<UniformGrid Columns="12" Margin="0 0 0 2" >
7162
<UniformGrid.Resources>
7263
<Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
7364
<Setter Property="Background" Value="Transparent"/>
@@ -198,39 +189,26 @@
198189
</Button>
199190
</UniformGrid>
200191

201-
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Margin="0 3 0 3" >
192+
<Grid Grid.Row="1" Margin="0 3 0 3">
202193
<Grid.RowDefinitions>
203194
<RowDefinition/>
204195
<RowDefinition/>
205196
</Grid.RowDefinitions>
206197

207-
<componentQueryEditor:QueryEditorView DataContext="{Binding QueryEditor}" />
198+
<componentQueryEditor:QueryEditorView DataContext="{Binding QueryEditor}"/>
208199

209-
<componentQueryVisualization:QueryVisualizationView Grid.Row="1" Margin="0 1 0 0" DataContext="{Binding QueryVisualization}"/>
200+
<componentQueryVisualization:QueryVisualizationView Grid.Row="1" Margin="0 1 0 0" DataContext="{Binding QueryVisualization}" />
210201
</Grid>
211202

212-
<DockPanel Grid.Row="2" Grid.Column="0" Margin="0 0 2 0" SizeChanged="Window_SizeChanged">
213-
<Border DockPanel.Dock="Bottom" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource GridSplitter.Background}" Height="auto" MaxHeight="444">
214-
<Grid Height="auto" Margin="0 1 0 1">
215-
<componentUtilityTree:UtilityTreeView DataContext="{Binding UtilityTree}" />
216-
</Grid>
217-
</Border>
218-
<componentExplorerTree:ExplorerTreeView DataContext="{Binding ExplorerTree}" />
219-
</DockPanel>
203+
<Border Background="{DynamicResource StatusBar.Background}" Margin="-2 0 0 0" Grid.ColumnSpan="3" Grid.Row="3"/>
220204

221-
<GridSplitter Grid.Row="2" Grid.Column="1" Background="{DynamicResource GridSplitter.Background}" Width="2" Margin="0 25 2 5" HorizontalAlignment="Left" VerticalAlignment="Stretch" />
205+
<componentWorkspaces:WorkspacesView Grid.Row="2" DataContext="{Binding Workspaces}" Margin="0 0 0 -21" />
222206

223-
<Grid Grid.Row="2" Grid.Column="2" Margin="-2 0 0 0">
224-
<componentList:ListView DataContext="{Binding List}" Visibility="{Binding DataContext.RightView, Converter={StaticResource EnumMatchToVisibilityConverter}, ConverterParameter=List, RelativeSource={RelativeSource AncestorType=Grid}}"/>
225-
226-
<componentList:CompareAndPinToolInfo Visibility="{Binding DataContext.RightView, Converter={StaticResource EnumMatchToVisibilityConverter}, ConverterParameter=CompareAndPinToolInfo, RelativeSource={RelativeSource AncestorType=Grid}}"/>
227-
</Grid>
228-
229-
<componentBusyIndicator:BusyIndicator Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" HorizontalAlignment="Left" Panel.ZIndex="1" VerticalAlignment="Bottom" Height="21" Padding="0 0 4 0" Margin="0 0 0 0"
207+
<componentBusyIndicator:BusyIndicator Grid.Row="2" Grid.Column="0" Grid.RowSpan="2" HorizontalAlignment="Left" Panel.ZIndex="2" VerticalAlignment="Bottom" Height="21" Padding="0 0 4 0" Margin="0 0 0 0"
230208
Background="{DynamicResource StatusBar.Background}"
231209
Visibility="{Binding IsRevitBusy, Converter={StaticResource BoolToVisibilityConverter}}" />
232210

233-
<Grid Background="{DynamicResource StatusBar.Background}" Margin="-2 0 0 0" Grid.ColumnSpan="3" Grid.Row="3">
211+
<Grid Margin="-2 0 0 0" Grid.ColumnSpan="3" Grid.Row="3">
234212
<Grid.Resources>
235213
<Style x:Key="ToolButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
236214
<Setter Property="Padding" Value="1"/>
@@ -294,9 +272,6 @@
294272
</Grid>
295273
</Grid>
296274
</Grid>
297-
298-
<GridSplitter Grid.Row="1" Background="{DynamicResource GridSplitter.Background}" Height="3" HorizontalAlignment="Stretch" Visibility="Collapsed"/>
299-
300-
<componentScripting:RDScriptingView Grid.Row="2" Visibility="Collapsed"/>
275+
301276
</Grid>
302277
</Window>

0 commit comments

Comments
 (0)