Skip to content

Commit 2139161

Browse files
authored
feat(ui): add Couchbase logo watermark to tree view background (#327)
1 parent 2381d35 commit 2139161

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

src/CodingWithCalvin.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@
105105
<Generator>MSBuild:Compile</Generator>
106106
</Page>
107107
</ItemGroup>
108+
<ItemGroup>
109+
<Resource Include="Resources\watermark.png" />
110+
</ItemGroup>
108111
<ItemGroup>
109112
<Content Include="..\..\LICENSE">
110113
<Link>resources\LICENSE</Link>

src/CodingWithCalvin.CouchbaseExplorer/CouchbaseExplorerWindowControl.xaml

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,26 @@
231231
</StackPanel>
232232
</Border>
233233

234-
<!-- Tree View -->
235-
<TreeView Grid.Row="1"
236-
x:Name="ExplorerTreeView"
237-
ItemsSource="{Binding Connections}"
238-
Background="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBackgroundKey}}"
239-
BorderThickness="0"
240-
ContextMenu="{StaticResource RootContextMenu}"
241-
VirtualizingStackPanel.IsVirtualizing="True"
242-
VirtualizingStackPanel.VirtualizationMode="Recycling"
243-
theming:ImageThemingUtilities.ImageBackgroundColor="{DynamicResource {x:Static vsshell:VsColors.ToolWindowBackgroundKey}}">
234+
<!-- Tree View Container with Watermark -->
235+
<Grid Grid.Row="1" Background="{DynamicResource {x:Static vsshell:VsBrushes.ToolWindowBackgroundKey}}">
236+
<!-- Watermark Logo -->
237+
<Image Source="/CodingWithCalvin.CouchbaseExplorer;component/Resources/watermark.png"
238+
HorizontalAlignment="Stretch"
239+
VerticalAlignment="Center"
240+
Margin="20"
241+
Opacity="0.08"
242+
Stretch="Uniform"
243+
IsHitTestVisible="False" />
244+
245+
<!-- Tree View -->
246+
<TreeView x:Name="ExplorerTreeView"
247+
ItemsSource="{Binding Connections}"
248+
Background="Transparent"
249+
BorderThickness="0"
250+
ContextMenu="{StaticResource RootContextMenu}"
251+
VirtualizingStackPanel.IsVirtualizing="True"
252+
VirtualizingStackPanel.VirtualizationMode="Recycling"
253+
theming:ImageThemingUtilities.ImageBackgroundColor="{DynamicResource {x:Static vsshell:VsColors.ToolWindowBackgroundKey}}">
244254
<TreeView.ItemContainerStyle>
245255
<Style TargetType="TreeViewItem">
246256
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
@@ -307,15 +317,16 @@
307317
</Style.Triggers>
308318
</Style>
309319
</TreeView.ItemContainerStyle>
310-
</TreeView>
320+
</TreeView>
311321

312-
<!-- Empty State -->
313-
<TextBlock Grid.Row="1"
314-
Text="Right-click to add a connection"
315-
HorizontalAlignment="Center"
316-
VerticalAlignment="Center"
317-
FontStyle="Italic"
318-
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.GrayTextKey}}"
319-
Visibility="{Binding Connections.Count, Converter={StaticResource CountToVisibilityConverter}, FallbackValue=Visible}" />
322+
<!-- Empty State -->
323+
<TextBlock Text="Right-click to add a connection"
324+
HorizontalAlignment="Center"
325+
VerticalAlignment="Center"
326+
FontStyle="Italic"
327+
Foreground="{DynamicResource {x:Static vsshell:VsBrushes.GrayTextKey}}"
328+
Visibility="{Binding Connections.Count, Converter={StaticResource CountToVisibilityConverter}, FallbackValue=Visible}"
329+
IsHitTestVisible="False" />
330+
</Grid>
320331
</Grid>
321332
</UserControl>
95.7 KB
Loading

0 commit comments

Comments
 (0)