This project is read-only.

ToggleButton content image is invisible

Dec 15, 2014 at 11:14 AM
Hello!

I have the following xaml code:
<mui:ModernWindow x:Class="ToggleButton.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mui="http://firstfloorsoftware.com/ModernUI"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <ToggleButton Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="20">
            <Image Source="Resources/icon.png"/>
        </ToggleButton>
    </Grid>
</mui:ModernWindow>
As a result running the app I have toggle button icon invisible. Making the same with wpf Window class without mui framework I got the icon visible.
What I made wrong?

Thanks in advance
Dec 22, 2014 at 9:56 AM
The default ModernWindow style doesn't render content, because there's no ContentPresenter. See here for the details and a solution.