-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10149 from AvaloniaUI/theme-variant-changes
ThemeVariant property definitions to ThemeVariantScope + fix DataGrid theme variant switch
- Loading branch information
Showing
17 changed files
with
305 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using Avalonia.Controls; | ||
using Avalonia.Metadata; | ||
|
||
namespace Avalonia.Styling; | ||
|
||
/// <summary> | ||
/// Interface for the host element with a theme variant. | ||
/// </summary> | ||
[Unstable] | ||
public interface IThemeVariantHost : IResourceHost | ||
{ | ||
/// <summary> | ||
/// Gets the UI theme that is currently used by the element, which might be different than the RequestedThemeVariantProperty. | ||
/// </summary> | ||
/// <returns> | ||
/// If current control is contained in the ThemeVariantScope, TopLevel or Application with non-default RequestedThemeVariant, that value will be returned. | ||
/// Otherwise, current OS theme variant is returned. | ||
/// </returns> | ||
ThemeVariant ActualThemeVariant { get; } | ||
|
||
/// <summary> | ||
/// Raised when the theme variant is changed on the element or an ancestor of the element. | ||
/// </summary> | ||
event EventHandler? ActualThemeVariantChanged; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.