-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Labels
Milestone
Comments
Can you provide more details or a reproduction project? The demo app uses a drawerhost with several text boxes inside of it. |
Basically the error is the textbox within a usercontrol.
This usercontrol is within a contentcontrol.
The contentcontrol is inside a materialDesign:DrawerHost.
The materialDesign:DrawerHost is inside a page.
Here is the piece of code.
…-------page
<materialDesign:DrawerHost Grid.Column="0" Grid.Row="0">
<materialDesign:DrawerHost.RightDrawerContent>
<Grid Background="Azure">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<ContentControl Content="{Binding
Pesquisa}"></ContentControl>
</Grid>
</materialDesign:DrawerHost.RightDrawerContent>
<Button ToolTip="Pesquisar" Width="100" Padding="0"
HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 74 10 0"
Command="{x:Static
materialDesign:DrawerHost.OpenDrawerCommand}" CommandParameter="{x:Static
Dock.Right}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="Search" />
<TextBlock Margin="8 0 0 0" Style="{StaticResource
MaterialDesignBody2TextBlock}" Text="Pesquisar" />
</StackPanel>
</Button>
</materialDesign:DrawerHost>
----------usercontrol
<UserControl x:Class="PesquisaView"
xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="
http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:LocaFacil"
mc:Ignorable="d"
xmlns:materialDesign="
http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="15"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto" d:DesignHeight="500"
KeyboardNavigation.TabNavigation="Cycle"
KeyboardNavigation.ControlTabNavigation="Cycle"
KeyboardNavigation.DirectionalNavigation="Cycle">
<Grid Background="white">
<TextBox></TextBox>
</Grid>
</UserControl>
Vandré Medina - Desenvolvimento Web
On Mon, Apr 13, 2020 at 12:14 PM Kevin B ***@***.***> wrote:
Can you provide more details or a reproduction project? The demo app uses
a drawerhost with several text boxes inside of it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1735 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPBMXCPGSJBX7W5PSWWRJDRMMT6XANCNFSM4MG44XOQ>
.
|
@Keboo this happens if the textbox does not contain TextFieldAssist.HasOutlinedTextField = "True". |
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>
|
This causes a large load on the CPU.
|
Hello.
I created sample code.
In this example, the software almost crashes, but it seems to be absurdly
slow and windows puts the status as "not responding".
In the complete source it freezes, and the mouse cursor disappears.
Synonymous with a "not responding" program.
In the code, if you comment on the textbox inside usercontrol1 and
uncomment the button, you'll see that the problem is over.
I hope that now it becomes easier to solve the problem.
thankful
WpfApp6.zip
<https://drive.google.com/file/d/1m3aWjANM09Fwp3dfTL-aqcl4jTHRUfef/view?usp=drive_web>
Vandré Medina - Desenvolvimento Web
…On Mon, Apr 20, 2020 at 3:43 AM sa68ru ***@***.***> wrote:
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>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1735 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANPBMXG3EOV4VCZNJ2KRY7DRNPVKLANCNFSM4MG44XOQ>
.
|
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
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
The text was updated successfully, but these errors were encountered: