
Hi There,
Apologies yes, the above XAML was poor! Here is an edited version of the Avalonia default application, that shows the issue:
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ActiproAccentTest.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="ActiproAccentTest.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
Icon="/Assets/avalonia-logo.ico"
Title="ActiproAccentTest">
<Design.DataContext>
<!-- This only sets the DataContext for the previewer in an IDE,
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
<vm:MainWindowViewModel/>
</Design.DataContext>
<Button Classes="theme-subtle accent" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="My Text"/>
<Button.Flyout>
<Flyout>
<TextBlock Text="My Flyout Text" Padding="10"/>
</Flyout>
</Button.Flyout>
</Button>
</Window>
I'm afraid I can't seem to upload images here, but interestingly the flyout shadow looks perfectly normal on Light theme. However, in dark theme I do get the accent-coloured shadow on Dark theme (by default, blue). In fact, I notice that this seems to be because the default shadow colour of the ShadowChrome control has changed. Is this the intended behaviour? If so, I suppose the solution would be to override the default ShadowChrome style?![]()
[Modified 4 days ago]