Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrawerHost crash when there's a textbox inside #1735

Closed
vandrerm opened this issue Apr 13, 2020 · 6 comments · Fixed by #1772
Closed

DrawerHost crash when there's a textbox inside #1735

vandrerm opened this issue Apr 13, 2020 · 6 comments · Fixed by #1772

Comments

@vandrerm
Copy link

vandrerm commented Apr 13, 2020

DrawerHost crash when there's a textbox inside.
Problem happens only in version 3.1.0 of MaterialDesignThemes.
I use Visual Studio and NuGet, .net framework 4.8

@Keboo Keboo added the Waiting on feedback Additional information is needed. Stale items with this label may be closed. label Apr 13, 2020
@Keboo
Copy link
Member

Keboo commented Apr 13, 2020

Can you provide more details or a reproduction project? The demo app uses a drawerhost with several text boxes inside of it.

@vandrerm
Copy link
Author

vandrerm commented Apr 14, 2020 via email

@sa68ru
Copy link

sa68ru commented Apr 19, 2020

@Keboo this happens if the textbox does not contain TextFieldAssist.HasOutlinedTextField = "True".

@Keboo
Copy link
Member

Keboo commented Apr 20, 2020

I am not able to replicate the crash, but I am able to cause the UI to hang and become unresponsive with:

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <materialDesign:DrawerHost>
        <materialDesign:DrawerHost.RightDrawerContent>
            <Grid Background="Azure" MinWidth="200">
                <!-- Works -->
                <TextBox materialDesign:TextFieldAssist.HasOutlinedTextField="True"/>
                <!-- Causes the UI to hang -->
                <!--<TextBox />-->
            </Grid>
        </materialDesign:DrawerHost.RightDrawerContent>

        <Button Width="100" HorizontalAlignment="Center" VerticalAlignment="Center" Content="Open"
                Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}" CommandParameter="{x:Static Dock.Right}" />
    </materialDesign:DrawerHost>
</Window>

@Keboo Keboo added bug and removed Waiting on feedback Additional information is needed. Stale items with this label may be closed. labels Apr 20, 2020
@Keboo Keboo added this to the 3.1.1 milestone Apr 20, 2020
@sa68ru
Copy link

sa68ru commented Apr 20, 2020

This causes a large load on the CPU.

<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:m="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:local="clr-namespace:Test"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <m:DialogHost>
        <m:DrawerHost>
            <m:DrawerHost.LeftDrawerContent>
                <StackPanel MinWidth="200">
                    <TextBox m:HintAssist.Hint="Test"/>
                </StackPanel>
            </m:DrawerHost.LeftDrawerContent>
        </m:DrawerHost>
    </m:DialogHost>
</Window>

@vandrerm
Copy link
Author

vandrerm commented Apr 20, 2020 via email

greuelpirat added a commit to greuelpirat/MaterialDesignInXamlToolkit that referenced this issue Apr 26, 2020
greuelpirat added a commit to greuelpirat/MaterialDesignInXamlToolkit that referenced this issue Apr 27, 2020
greuelpirat added a commit to greuelpirat/MaterialDesignInXamlToolkit that referenced this issue Apr 27, 2020
greuelpirat added a commit to greuelpirat/MaterialDesignInXamlToolkit that referenced this issue Apr 27, 2020
Keboo pushed a commit that referenced this issue Apr 27, 2020
* Set size of DashedLine explicit to prevent infinite measuring (#1735)

* Added lost disabled controls again (#1749)

* Binding Height of DashedLine to Self.StrokeThickness (#1735)

* Added BottomThicknessConverter, used for DashedLine to get StrokeThickness (#1735)

* Added missing BottomThicknessConverter for TimePicker (#1735)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants