4 changed files with 41 additions and 18 deletions
@ -0,0 +1,21 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using Avalonia.Styling; |
||||
|
|
||||
|
namespace Avalonia.Diagnostics |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Contains information about style related diagnostics of a control.
|
||||
|
/// </summary>
|
||||
|
public class StyleDiagnostics |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Currently applied styles.
|
||||
|
/// </summary>
|
||||
|
public IReadOnlyList<IStyleInstance> AppliedStyles { get; } |
||||
|
|
||||
|
public StyleDiagnostics(IReadOnlyList<IStyleInstance> appliedStyles) |
||||
|
{ |
||||
|
AppliedStyles = appliedStyles; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
namespace Avalonia.Diagnostics |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Defines diagnostic extensions on <see cref="StyledElement"/>s.
|
||||
|
/// </summary>
|
||||
|
public static class StyledElementExtensions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Gets a style diagnostics for a <see cref="StyledElement"/>.
|
||||
|
/// </summary>
|
||||
|
/// <param name="styledElement">The element.</param>
|
||||
|
public static StyleDiagnostics GetStyleDiagnostics(this StyledElement styledElement) |
||||
|
{ |
||||
|
return styledElement.GetStyleDiagnosticsInternal(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue