MaterialDesignInXAML / MaterialDesignInXamlToolkit

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

RadioButton (within ToolBar under TabControl) selection changes TabControl Tab index (used to work in at least 4.x release) #3678

Closed bebenins closed 1 day ago

bebenins commented 1 day ago

Bug explanation

Super weird... This is a somewhat recent bug I discovered after switching from 4.7.1 release to the latest 5.1 release. To reproduce:

  1. Select SOM TabItem
  2. Select HAL TabItem
  3. Click TXCD RadioButton and observe TabControl automatically switch back to SOM TabItem.

This issue goes away if you simply remove "Reload" button (the only button) from SOM TabItem's ToolBar

Attached is a stripped down to bones sample project: MD_5.0_RadioButtonPlusTabControlTest.zip

Version

5.1.1-ci753

bebenins commented 1 day ago

Update - this looks like a new .NET WPF bug. I was able to reproduce this without using MD library. Would like to hear a second opinion before closing this (will look for workarounds to suppress TabCotrol TabItem SelectionChanged event

corvinsz commented 1 day ago

@bebenins apparently this is a WPF bug (2278) that has been reported 2019 already. The creator has also posted a workaround in their issue.

corvinsz commented 1 day ago

@bebenins though I can't think of a solution currently, even if there was a way around this, in my opinion this library should not be responsible for fixing bugs in it's base-library (WPF). You are welcome to keep this issue open if you want another opinion on this.

bebenins commented 1 day ago

@corvinsz Totally agree. I will mark this as closed. I guess Dragablz DLL goes way earlier than 2019 haha (I switched from Dragablz to MD TabControl). Thank you!