diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index 7df5ecc..a5ce871 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -7,7 +7,7 @@ on:
- 'feature/**'
env:
- version: '10.7.${{ github.run_number }}'
+ version: '10.8.${{ github.run_number }}'
dotnetVersion: '8'
repoUrl: ${{ github.server_url }}/${{ github.repository }}
vsixPath: src/CodeNav/bin/Release/net472/CodeNav.vsix
diff --git a/README.md b/README.md
index c26f582..1e9c389 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
-
+
# CodeNav
Visual Studio extension to show the code structure of your current document
[](https://github.com/sponsors/sboulema)
-## Features
+# ✨ Features
- Quickly see all the important methods and properties in your document
- Never get lost during a refactoring of a super long document
- Clicking on an item in the list will take you to that location in the document
@@ -23,27 +23,28 @@ Visual Studio extension to show the code structure of your current document
- Bookmarks
- Synced collapsing/expanding outline regions
- Option to hide the tool window for unsupported files and files without code items
+- Compact mode with less spacing optimizing screen real estate
-## Supported Visual Studio versions
+# 💻 Supported Visual Studio versions
- Visual Studio 2022 (Untested)
- Visual Studio 2026
-## Language support
+# 🔤 Language support
- C#
-## Installing
-[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026) [](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026)
+# ⬇️ Installing
+[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026)
[GitHub Releases](https://github.com/sboulema/CodeNav/releases)
[Open VSIX Gallery](https://www.vsixgallery.com/extension/CodeNav.dcdbcca4-3a88-432f-ba04-eb4a4cb64437)
-## Usage
+# 🤲 Usage
The CodeNav tool window can be opened via the entry in the `Extensions` menu.
-## Screenshots
+# 🖼️ Screenshots
 
#### Filter window
@@ -55,5 +56,8 @@ The CodeNav tool window can be opened via the entry in the `Extensions` menu.
#### Bookmarks

-## Documentation
+#### Compact mode
+
+
+# 📄 Documentation
Looking for more info? Read the full [Documentation](https://github.com/sboulema/CodeNav/blob/main/docs/index.md) with links, guides, troubleshooting, and tips.
\ No newline at end of file
diff --git a/art/Compact.png b/art/Compact.png
new file mode 100644
index 0000000..3e53f8d
Binary files /dev/null and b/art/Compact.png differ
diff --git a/art/Screenshot-light.png b/art/Screenshot-light.png
index 5f73d41..918e7b8 100644
Binary files a/art/Screenshot-light.png and b/art/Screenshot-light.png differ
diff --git a/art/Settings.png b/art/Settings.png
index 45b34f2..267e5cb 100644
Binary files a/art/Settings.png and b/art/Settings.png differ
diff --git a/docs/settings.md b/docs/settings.md
index c922d87..10079f6 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -18,6 +18,10 @@ Enable or disable highlighting the item in CodeNav based on caret position
Enable or disable showing the CodeNav tool window for unsupported files and files without code items
+**Use compact mode with less spacing**
+
+Enable or disable showing items in a condensed form with less vertical spacing optimizing screen real estate
+
**Update CodeNav while typing**
Enable of disable updating the list of code items in CodeNav while typing in the text editor
diff --git a/src/CodeNav.OutOfProc/CodeNav.OutOfProc.csproj b/src/CodeNav.OutOfProc/CodeNav.OutOfProc.csproj
index 85a6bdc..952d906 100644
--- a/src/CodeNav.OutOfProc/CodeNav.OutOfProc.csproj
+++ b/src/CodeNav.OutOfProc/CodeNav.OutOfProc.csproj
@@ -38,6 +38,7 @@
+
diff --git a/src/CodeNav.OutOfProc/Dialogs/FilterDialog/FilterDialogControl.xaml b/src/CodeNav.OutOfProc/Dialogs/FilterDialog/FilterDialogControl.xaml
index de711ec..67da4e9 100644
--- a/src/CodeNav.OutOfProc/Dialogs/FilterDialog/FilterDialogControl.xaml
+++ b/src/CodeNav.OutOfProc/Dialogs/FilterDialog/FilterDialogControl.xaml
@@ -16,8 +16,8 @@
@@ -25,7 +25,7 @@
@@ -35,6 +35,10 @@
Show the tool window for unsupported files and files without code items
+
+
+ Use compact mode with less spacing
+
diff --git a/src/CodeNav.OutOfProc/Dialogs/SettingsDialog/SettingsDialogData.cs b/src/CodeNav.OutOfProc/Dialogs/SettingsDialog/SettingsDialogData.cs
index 925a4ef..2c30e7f 100644
--- a/src/CodeNav.OutOfProc/Dialogs/SettingsDialog/SettingsDialogData.cs
+++ b/src/CodeNav.OutOfProc/Dialogs/SettingsDialog/SettingsDialogData.cs
@@ -46,4 +46,10 @@ public class SettingsDialogData
///
[DataMember]
public bool ShowToolWindowForUnsupportedFiles { get; set; } = true;
+
+ ///
+ /// Setting if CodeNav should use a compact mode with less vertical margins
+ ///
+ [DataMember]
+ public bool UseCompactMode { get; set; }
}
diff --git a/src/CodeNav.OutOfProc/Models/GlobalSettings.cs b/src/CodeNav.OutOfProc/Models/GlobalSettings.cs
index 462cd0f..33ee6cc 100644
--- a/src/CodeNav.OutOfProc/Models/GlobalSettings.cs
+++ b/src/CodeNav.OutOfProc/Models/GlobalSettings.cs
@@ -1,5 +1,4 @@
using CodeNav.OutOfProc.Constants;
-using System.Runtime.Serialization;
namespace CodeNav.OutOfProc.Models;
@@ -36,11 +35,15 @@ public class GlobalSettings
public bool EnableCrashAnalytics { get; set; }
///
- /// Setting if CodeNav should be shown or hidden for unsupported files and files without code items
+ /// Settings dialog - Setting if CodeNav should be shown or hidden for unsupported files and files without code items
///
- [DataMember]
public bool ShowToolWindowForUnsupportedFiles { get; set; } = true;
+ ///
+ /// Settings dialog - Setting if CodeNav should use a compact mode with less vertical margins
+ ///
+ public bool UseCompactMode { get; set; }
+
///
/// Main toolbar - Setting to store the selected sort order for code items
///
diff --git a/src/CodeNav.OutOfProc/Services/CodeDocumentService.cs b/src/CodeNav.OutOfProc/Services/CodeDocumentService.cs
index 43957d5..39d19e3 100644
--- a/src/CodeNav.OutOfProc/Services/CodeDocumentService.cs
+++ b/src/CodeNav.OutOfProc/Services/CodeDocumentService.cs
@@ -171,6 +171,7 @@ public async Task LoadGlobalSettings(bool readFromDisk = false)
UpdateWhileTyping = GlobalSettings.UpdateWhileTyping,
EnableCrashAnalytics = GlobalSettings.EnableCrashAnalytics,
ShowToolWindowForUnsupportedFiles = GlobalSettings.ShowToolWindowForUnsupportedFiles,
+ UseCompactMode = GlobalSettings.UseCompactMode,
};
var filterRules = GlobalSettings
diff --git a/src/CodeNav.OutOfProc/ToolWindows/CodeNavToolWindowControl.xaml b/src/CodeNav.OutOfProc/ToolWindows/CodeNavToolWindowControl.xaml
index bfe85c2..ca37b77 100644
--- a/src/CodeNav.OutOfProc/ToolWindows/CodeNavToolWindowControl.xaml
+++ b/src/CodeNav.OutOfProc/ToolWindows/CodeNavToolWindowControl.xaml
@@ -20,7 +20,7 @@
-
+
-
+
-
+
-
+
+
+
+
+
+
@@ -194,9 +232,15 @@
HorizontalAlignment="Stretch">
-
+
+ FontSize="{Binding FontSize}"
+ VerticalAlignment="Center">
-
+
+
+
+
+
+
+
+
@@ -245,13 +309,20 @@
HorizontalAlignment="Stretch">
-
+
+ FontSize="{Binding FontSize}"
+ VerticalAlignment="Center" />
-
+
+
+
+
+
diff --git a/src/CodeNav.OutOfProc/ToolWindows/Templates/ExpanderStyles.xaml b/src/CodeNav.OutOfProc/ToolWindows/Templates/ExpanderStyles.xaml
index a7308ca..e166c5c 100644
--- a/src/CodeNav.OutOfProc/ToolWindows/Templates/ExpanderStyles.xaml
+++ b/src/CodeNav.OutOfProc/ToolWindows/Templates/ExpanderStyles.xaml
@@ -74,7 +74,7 @@
-
+
@@ -83,7 +83,8 @@
-
@@ -136,7 +137,7 @@
-
+
@@ -156,6 +157,9 @@
+
+
+
diff --git a/src/CodeNav.OutOfProc/ViewModels/CodeDocumentViewModel.cs b/src/CodeNav.OutOfProc/ViewModels/CodeDocumentViewModel.cs
index a017dc6..9af55be 100644
--- a/src/CodeNav.OutOfProc/ViewModels/CodeDocumentViewModel.cs
+++ b/src/CodeNav.OutOfProc/ViewModels/CodeDocumentViewModel.cs
@@ -242,6 +242,7 @@ private async Task Settings(object? commandParameter, IClientContext clientConte
CodeDocumentService.GlobalSettings.UpdateWhileTyping = CodeDocumentService.SettingsDialogData.UpdateWhileTyping;
CodeDocumentService.GlobalSettings.EnableCrashAnalytics = CodeDocumentService.SettingsDialogData.EnableCrashAnalytics;
CodeDocumentService.GlobalSettings.ShowToolWindowForUnsupportedFiles = CodeDocumentService.SettingsDialogData.ShowToolWindowForUnsupportedFiles;
+ CodeDocumentService.GlobalSettings.UseCompactMode = CodeDocumentService.SettingsDialogData.UseCompactMode;
await SettingsHelper.SaveGlobalSettings(CodeDocumentService);
diff --git a/src/CodeNav.OutOfProc/ViewModels/CodeItem.cs b/src/CodeNav.OutOfProc/ViewModels/CodeItem.cs
index 5f47839..c928cc9 100644
--- a/src/CodeNav.OutOfProc/ViewModels/CodeItem.cs
+++ b/src/CodeNav.OutOfProc/ViewModels/CodeItem.cs
@@ -236,6 +236,15 @@ public double FontSize
set => SetProperty(ref _fontSize, value);
}
+ ///
+ /// If the code item should use less vertical space based on the settings
+ ///
+ [DataMember]
+ public bool UseCompactMode
+ {
+ get => CodeDocumentViewModel?.CodeDocumentService?.GlobalSettings?.UseCompactMode == true;
+ }
+
#region Commands
[DataMember]
public AsyncCommand ClickItemCommand { get; }