benruehl / adonis-ui

Lightweight UI toolkit for WPF applications offering classic but enhanced windows visuals
https://benruehl.github.io/adonis-ui/
MIT License
1.73k stars 145 forks source link

ClassicTheme presence causes ListBox items to break #103

Closed micah686 closed 4 years ago

micah686 commented 4 years ago

Describe the bug If you have the ClassicTheme entry enabled in App.xaml, it prevents Listbox items from showing at their normal size. It shows them at like 10 pixels wide by 5 pixels tall.

To Reproduce Steps to reproduce the behavior: 1) Make sure the following is enabled in App.xaml:

<ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.ClassicTheme}"/>
<Application x:Class="TestCore.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:TestCore"
             xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
             xmlns:s="https://github.com/canton7/Stylet">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <s:ApplicationLoader>
                    <s:ApplicationLoader.Bootstrapper>
                        <local:Bootstrapper/>
                    </s:ApplicationLoader.Bootstrapper>
                </s:ApplicationLoader>

                <ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.DarkColorScheme}"/>
                <!--<ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.ClassicTheme}"/>-->

            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Expected behavior ListBox Collection of items performs normally.

Screenshots classicThemeEnabled classicThemeDisabled

Additional context I have attached the project for you to see the issue firsthand. My nuget packages directory is somewhere else on my computer, so you may need to add the main Adonis-UI to the project to get it to work. TestCore_bug.zip

Please let me know if you need more information, as this bug causes major issues for me.

benruehl commented 4 years ago

Thanks for reporting.

By looking at your demo app I found out that you are not using a ListBox as you described but a ListView instead. This control is currently only supported in combination with a GridView (by setting ListView.View to a GridView). Using a ListView without GridView will be supported in the future. In the meantime you can simply go to your GamesGridView.xaml and replace your ListView with a ListBox and you're done.

See #68 for an identical report.

micah686 commented 4 years ago

Ok, thanks. That seems to work.