Categories > Coding > C# >
Closing an unselected tab in WPF
Posted
I was wondering how to close a tab that's not selected.
For example, I have tab 1 and tab 2. I have tab 2 selected but I want to close tab 1 using its close button if that makes sense.
So tabs.Items.Remove(tabs.SelectedItem) won't work.
charsss
Replied
What Do You Mean Close? Also Your Code Removes The Currently Selected Not Previous
Cancel
Post
"Building blocks of imagination, united in the virtual realm, where creativity thrives and friendships ignite. Welcome to the Roblox revolution!" - chatgpt
Replied
@ImmuneLion318 like removing the tab that isn't selected by pressing an X button on it.
Cancel
Post
charsss
Replied
Just Learn Basic C# And Even At That Why Let User Close Other Tabs I Just Let Close Currently Selected.
Cancel
Post
Replied
@ImmuneLion318 Alright I'll just make it close the current tab, I just didn't want the exploit closing the current tab when the user wanted to close another one.
Cancel
Post
charsss
Replied
Cancel
Post
im bipolar btw
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post