File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ internal class TabsViewModel : ViewModelBase
2323
2424 public TabsViewModel ( )
2525 {
26- var closeCommand = new AnotherCommandImplementation ( _ =>
26+ var closeCommand = new AnotherCommandImplementation ( tab =>
2727 {
28- if ( SelectedTab is { } selectedTab )
29- CustomTabs ? . Remove ( selectedTab ) ;
28+ if ( tab is CustomTab castedTab )
29+ CustomTabs ? . Remove ( castedTab ) ;
3030 } ) ;
3131
3232 CustomTabs = new ( )
Original file line number Diff line number Diff line change 732732 <DataTemplate >
733733 <StackPanel Orientation =" Horizontal" >
734734 <TextBlock Text =" {Binding CustomHeader}" />
735- <Button Command =" {Binding CloseCommand}" >
735+ <Button Command =" {Binding CloseCommand}" CommandParameter = " {Binding .} " >
736736 <Button .Template>
737737 <ControlTemplate >
738738 <materialDesign : PackIcon Kind =" Close"
You can’t perform that action at this time.
0 commit comments