I have a togglethemebutton that worked perfectly in version 23.*, but since upgrading to 24.1, it is not visible
<Expander IsExpanded="True" Width="200" Margin="5" Header="{Binding}">
<Expander.HeaderTemplate>
<DataTemplate x:DataType="vm:GeneralSettingsViewModel">
<Grid>
<TextBlock Text="{DynamicResource Localization.AppSettings.LookAndFeel}" HorizontalAlignment="Center"/>
</Grid>
</DataTemplate>
</Expander.HeaderTemplate>
<StackPanel >
<actipro:ToggleThemeButton IsEnabled="True" IsVisible="True" Background="Red" MinHeight="25" MinWidth="25" />
<TextBlock Text="Colour scheme"/>
<ComboBox SelectedItem="{Binding UiSettings.ThemeName}" />
<TextBlock Text="Should I offer multiple layouts here?"/>
<ComboBox />
</StackPanel>
</Expander>
I also have the button in a different location in a task bar kind of setup, and it doesn't display either:
<Border DockPanel.Dock="Bottom" Height="30" VerticalAlignment="Bottom" BorderThickness="1" BorderBrush="{DynamicResource SystemChromeGrayColor}" Padding="3">
<Grid VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" >
<Image Source="{SvgImage /Assets/Images/bxs-user-check.svg}" IsVisible="{Binding LoggedIn}"/>
<Image Source="{SvgImage /Assets/Images/bxs-user-x.svg}" IsVisible="{Binding NotLoggedIn}"/>
<Image Source="{SvgImage /Assets/Images/bx-run.svg}" IsVisible="{Binding Running}"/>
<Image Source="{SvgImage /Assets/Images/bx-stop.svg}" IsVisible="{Binding Stopped}"/>
<TextBlock Text="Status: " VerticalAlignment="Bottom"/>
<TextBlock Text="{Binding StatusMessage}"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" >
<TextBlock Text="Last Action: "/>
<TextBlock Text="{Binding LastAction}"/>
</StackPanel>
<actipro:ToggleThemeButton Grid.Column="2" />
</Grid>
</Border>
I tried creating a blank avalonia desktop app, adding the Actipro shared components, setting the theme to modern and adding the toggle theme button and it doesn't show:
I can see that it works in the sample browser but can't reproduce it.