You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Chromium-style tab strip with scrollable tabs, an add button, and closable/editable tab items.
Basic usage
<PleasantTabView>
<PleasantTabItemHeader="Tab 1">
<TextBlockText="Content of tab 1"Margin="20" />
</PleasantTabItem>
<PleasantTabItemHeader="Tab 2">
<TextBlockText="Content of tab 2"Margin="20" />
</PleasantTabItem>
</PleasantTabView>
PleasantTabView properties
Property
Type
Default
Description
AdderButtonIsVisible
bool
true
Shows the + button to add new tabs
MaxWidthOfItemsPresenter
double
∞
Caps the tab strip width
MarginType
None / Little / Extended
None
Margin applied around the content area
PleasantTabView events
Event
Description
ClickOnAddingButton
Fired when the + button is clicked — add a new tab here
PleasantTabItem properties
Property
Type
Default
Description
IsClosable
bool
true
Shows the × close button on the tab
IsEditedIndicator
bool
false
Shows a dot indicator (e.g. unsaved changes)
PleasantTabItem events
Event
Description
Closing
Fired when the tab is about to close
CloseButtonClick
Fired when the × button is clicked
Dynamic tab management
// Add a tab when + is clickedtabView.ClickOnAddingButton+=(_,_)=>{tabView.Items.Add(newPleasantTabItem{Header=$"Tab {tabView.Items.Count+1}",Content=newMyTabContent()});};// Prevent closing a specific tabtab.Closing+=(_,e)=>{if(HasUnsavedChanges())e.Handled=true;// cancel close};
Programmatic close
tab.CloseCore();// removes the tab from its parent PleasantTabView