Comments (5)
Hi,
I add counter to count window it won't create multiple window with empty TabItem with this
if (Application.Current.Windows.Count > 1)
{
return TabEmptiedResponse.CloseWindowOrLayoutBranch;
}
else
{
return TabEmptiedResponse.DoNothing;
}
Thanks for the help
from dragablz.
There is already a hook provided so you can suppress this behaviour. You need to implement your own IInterTabClient and provide it via the InterTabController.
Something like:
<TabablzControl>
<TabablzControl.InterTabController>
<InterTabController InterTabClient="{Binding MyInterTabClient}">
By default, the DefaultInterTabClient client is used.
You can create your own, however to make things a little easier I have made the members on DefaultInterTabClient virtual (NuGet .102) so you can derive from that class if you want.
In your case, when you are programmatically removing items, you might need to temporarily adjust the TabEmptiedResponse, which will worked, as it is checked every-time. You may also be interested in IsClosingAsPartOfDragOperation which can help you distinguish when TabablzControl is closing the tab.
Hope this helps, gonna close this one.
from dragablz.
Hi Kogare, not quite sure what you're asking?
from dragablz.
I'm add that snippet in my override codes in TabEmptiedResponse TabEmptiedHandler(TabablzControl tabControl, Window window).
Because without that statement, when I tear TabItem and then close it, the window stay open unless I close the window explicitly. It becomes a problem when I tearing several TabItems and closing them, it makes multiple windows without any TabItem, so I add that code to tell apps to close the windows if there is more than one windows.
from dragablz.
ahhh, so you are happy, & everything's working? I wasn't sure if you were asking a further question. :)
As an aside, you might want to keep an eye on issue #15, as to help with that I might add another hook to help consolidate tabs.
from dragablz.
Related Issues (20)
- TabablzControl crashes when no tab items are present
- close button can't show HOT 1
- Dockablz layout does not show Dropzones when inside NavigationView
- Need to update SecondaryAccentBrush to SecondaryHueMidBrush
- Tabablz Item Template unable to set Tab title. Just shows as path to item template source HOT 1
- [Question] drag and drop between two or more lists HOT 2
- Documentation of classes
- MoveWindowWithSolitaryTabs issue
- TabablzControl SelectedIndex binding catches all exception from bound property
- Button in TabItem header
- is there a way to make dragablztabcontrol NOT TEARABLE?
- Layout: Cannot change FloatingItem Content
- How we can do this? : Open forms in different threads and then move the mainwindow all other forms must be move with them in wpf.
- MDI: New added floating item will not show at the front.
- .Net 7 Issue
- Throws System.Reflection.TargetInvocationException while dragging a tab when the tabs are created using ItemsSource.
- handling Default close button HOT 1
- Equal width for all tabs
- Brush renames on MaterialDesignInXAML 5.0.0 HOT 1
- Disposing closed tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragablz.