MaterialDesignInXAML / MaterialDesignInXamlToolkit

Google's Material Design in XAML & WPF, for C# & VB.Net.
http://materialdesigninxaml.net
MIT License
15.18k stars 3.43k forks source link

textbox update Cause UI doesn't response #2228

Open ycccq opened 3 years ago

ycccq commented 3 years ago

When set the textbox in tableitem,if textbox update fast,five miniutes later change tableitem,the UI doesn't response,just see the test demo MaterialDesignBugTest .

MichelMichels commented 3 years ago

Nice find! I'm looking into this. A temporary workaround is setting your Bindings to IsAsync="True".

Keboo commented 3 years ago

Just for historical record, attaching the above linked project. MaterialDesignBugTest-main.zip

ycccq commented 3 years ago

If I update the textbox every 100ms , about 2 days later , the UI doesn't response. If I don't use MaterialDesignInXamlToolkit style the UI is OK.

ycccq commented 3 years ago

Nice find! I'm looking into this. A temporary workaround is setting your Bindings to IsAsync="True". @MichelMichels Thanks, I just test the solution,and I set Bindings to IsAsync="True",but It doesn't work.

<TabControl>
    <TabItem Header="A1">
        <TextBox Text="{Binding testvalue1,IsAsync=True}"/>
    </TabItem>
    <TabItem Header="A2">
        <TextBox Text="{Binding testvalue2,IsAsync=True}"/>
    </TabItem>
</TabControl>

and if set the style is null,maybe it is a temporary workaround.

<TabControl>
    <TabItem Header="A1">
        <TextBox Text="{Binding testvalue1}" Style="{x:Null}"/>
    </TabItem>
    <TabItem Header="A2">
        <TextBox Text="{Binding testvalue2}" Style="{x:Null}"/>
    </TabItem>
</TabControl>