Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DevTools): Add LaunchView property to DevToolsOptions #14008

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Avalonia.Diagnostics/Diagnostics/DevToolsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,10 @@ public class DevToolsOptions
/// Get or set Focus Highlighter <see cref="Brush"/>
/// </summary>
public IBrush? FocusHighlighterBrush { get; set; }

/// <summary>
/// Set the <see cref="DevToolsViewKind">kind</see> of diagnostic view that show at launch of DevTools
/// </summary>
public DevToolsViewKind LaunchView { get; init; }
}
}
20 changes: 20 additions & 0 deletions src/Avalonia.Diagnostics/Diagnostics/DevToolsViewKind.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
namespace Avalonia.Diagnostics;

/// <summary>
/// Kinds of diagnostic views available in DevTools
/// </summary>
public enum DevToolsViewKind
{
/// <summary>
/// The Logical Tree diagnostic view
/// </summary>
LogicalTree,
/// <summary>
/// The Visual Tree diagnostic view
/// </summary>
VisualTree,
/// <summary>
/// Events diagnostic view
/// </summary>
Events,
}
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ public void SetOptions(DevToolsOptions options)
StartupScreenIndex = options.StartupScreenIndex;
ShowImplementedInterfaces = options.ShowImplementedInterfaces;
FocusHighlighter = options.FocusHighlighterBrush;
SelectedTab = (int)options.LaunchView;
}

public bool ShowImplementedInterfaces
Expand Down