butchersboy / dragablz Goto Github PK
View Code? Open in Web Editor NEWDragable and tearable tab control for WPF
Home Page: http://dragablz.net
License: MIT License
Dragable and tearable tab control for WPF
Home Page: http://dragablz.net
License: MIT License
When you start two different instance of program and try to move one tab from another,unlike chrome it wont work. Chrome allows tab movement from one window to another regardless of its instance creation but demo your dll simply treats it as a different process and tab movement doesnot work.
If possible, I would like to see this implemented in your library.
If you bind the Tabablz control to a collection of TabItems when selecting a new tab the tab header appears to be selected, but the content does not update to the content for the newly selected tab.
I have created a sample application here: https://github.com/ksenkevich/DragablzTestApp. What I would like to do is when a tab tears out it stays the same size as it was in the tab control with the tab control not being the full size of the window. Currently, it is using the size of the parent window. It seems like this would just require some modifications to the MonitorBreach method in the TabablzControl.
Would It be possible to include a Property, that Tabs could not be closed? When this is set, and a Window with Tabs is closed, the Tabs are arranged back to the main TabControl!
When a spawned window is maximized, the bottom border expands to the bottom of the screen. Instead, it should stop at the top of the windows start bar.
I'm trying to debug some exceptions thrown from dragablz and the pdbs would really help. Please include symbol packages.
Sorry I fell a sleep.
It was 1 a.m in my timezone.
A lot of people seem to want to have a fixed home/start/initial tab as the first tab. A FrozenTabCount, bit like a frozen header in Excel should be a nice way to deal with this. Can't freeze individual tabs as dragging experience would be odd (although you can freeze all tabs). Freezing from the start is do-able though.
In my opinion these options would make the "Assembly" more customizable overall.
<dragablz:TabablzControl DissalowDragDrop="True">
<dragablz:TabablzControl.InterTabController>
<dragablz:InterTabController/>
</dragablz:TabablzControl.InterTabController>
<TabItem Header="Tab 1" />
<TabItem Header="Tab 2" />
<TabItem Header="Tab 3" />
</dragablz:TabablzControl>
<dragablz:TabablzControl>
<dragablz:TabablzControl.InterTabController>
<dragablz:InterTabController/>
</dragablz:TabablzControl.InterTabController>
<TabItem Header="Tab 1" DissalowDragDrop="True" />
<TabItem Header="Tab 2" DissalowDragDrop="True" />
<TabItem Header="Tab 3" DissalowDragDrop="True" />
</dragablz:TabablzControl>
<dragablz:TabablzControl DissalowDragOut="True">
<dragablz:TabablzControl.InterTabController>
<dragablz:InterTabController/>
</dragablz:TabablzControl.InterTabController>
<TabItem Header="Tab 1" />
<TabItem Header="Tab 2" />
<TabItem Header="Tab 3" />
</dragablz:TabablzControl>
<dragablz:TabablzControl>
<dragablz:TabablzControl.InterTabController>
<dragablz:InterTabController/>
</dragablz:TabablzControl.InterTabController>
<TabItem Header="Tab 1" DissalowDragOut="True" />
<TabItem Header="Tab 2" DissalowDragOut="True" />
<TabItem Header="Tab 3" DissalowDragOut="True" />
</dragablz:TabablzControl>
I just realized that there's no Animation on the Vertical Tab Control (Using Material Design one).
I mean the OnClick Animation.
It would be nice to be able to use docking with custom controls by either passing to a generic or using a control that could be composed of a standard bad or inherit from an interface.
Hi,
Testing in Window 10 the sample app, I found an wrong behavior in the float item.
When you expand the float window to full parent window size, the command buttons gets behind the parent window's command buttons:
Dunno if it`s a bug, or can just be set via code to disable this behavior.
BTW, good work on the DPI issue, nailed it. :)
By default the headersuffix will take up 74px of space for no understandable reason.
This leaves a 74px gap of useless space in a tabheader unless overridden.
The default should be a grid of no size to allow the tabcontrolheader to take up all the space without having to specify a suffix.
The code:
<Setter.Value>
</Setter.Value>
Should be:
<Setter.Value>
</Setter.Value>
Content changed but the header is not selected when using aTabItem.IsSelected = true; via code behind.
Thanks for great control
It would be nice for the Nuget Package to use strong named assemblies
Out of the box, I replaced my tab control, which uses an item template for the tabs and content template for each tab's content. Immediately, when I tear the tab out, I was able to see that each property that is being bound to a property on the view model had its setter called infinitely. This is a bigger problem because I have an event fire to do some work each time one of those properties change.
Found Exception:
An exception of type 'System.ArgumentException' occurred in WindowsBase.dll but was not handled in user code
Additional information: Cannot set Expression. It is marked as 'NonShareable' and has already been used.
Repeatable conditions:
Drag tab from "Simple form of bound tabs" and drop on right hand dock on "Basic example defining tab content"
After closing a tab, the tab which is being selected is the one which was first opened, which can be very annoying. Better solution - after close to select the last selected tab. Or the one which is last in order. I will be implementing the first scenario (with the last selected tab), so if you want I could implement it in the control and make a pull request.
FixedHeaderCount works as advertised with > 1 tab. When there is only 1 tab, that tab is free to move and join another TabablzControl.
The screencast is currently using lyrics from the nursery rhyme Monday's Child. I think this demonstration would be much improved by switching to lyrics from The Cure's Friday I'm In Love.
Is there any reason as to why? Im new to WPF and prefered WinForms but wanna give this a shot...
Default Add Button shows up to the right of the last tab. If there are more tabs than the control width, then left/right scroll buttons show up.
Would be nice if the Add Button remained on screen at all times (just to the left of the scroll button if scroll buttons are visible)
There is only a version available in a nuget-description.
The version included as assembly-version will help to identify the used version after deployment.
I believe that a window should maximize/return to previous size if the top border is double clicked.
Hi,
I see that dragablz support MDI and found one issue related with that
Mdi window can be dragged out of the top boder (higher than tabs) and go under window buttons like (maximize, cloze, etc) Could be also problem when usin gwindows commands with MA.Metro.
Could you please limit that MDI window not to be possible to drag out from the tabs border?
I am getting the following error when attempting to close a tab via the built in close button when not using a InterTabClient:
System.NullReferenceException: Object reference not set to an instance of an object.
at Dragablz.TabablzControl.RemoveFromSource(Object item) in c:\projects\dragablz\Dragablz\TabablzControl.cs:line 1015
at Dragablz.TabablzControl.RemoveItem(DragablzItem dragablzItem) in c:\projects\dragablz\Dragablz\TabablzControl.cs:line 808
at Dragablz.TabablzControl.CloseItemHandler(Object sender, ExecutedRoutedEventArgs executedRoutedEventArgs) in c:\projects\dragablz\Dragablz\TabablzControl.cs:line 1124
at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
(from WordPress)
Hello James,
a big thank you for the library.
It seems I’ve found a bug.
When I press Ctrl+Tab nothing happens. If I press it a second time I get a null reference exception.
I can reproduce this error in all you demo apps.
Arno
I cannot find a way to programmatically specify the docking position of a tab. I can dock tabs by drag and drop but I'm looking for something equivalent to the DockPanel.Dock
attached property that I can set on the TabItem
.
Steps to reproduce:
Header = value ? "ABCDEFGHIJKLMNOPQRSTUVWXYZ" : "123";
Thanks!
Emm, I could not find any style named "MahAppsTabHeaderItemStyle" in DragablzModernUIDemo.
There is a need to know whether dragablz is closing a window because a user is dragging, or whether a window is being closed due to the user pressing the close button.
This is required as I am binding to disposable view models which of course need to be disposed correctly.
This can be replicated using this https://github.com/RolandPheasant/TradingDemo. Open some windows and drag one window out and pop it back into a side dock. You will see that the menu buttons stop working.
Implement VS like top/bottom/left/right side panels with possibility to hide/show them to increase free space if needed.
Hello,
First of all I want to say that it's a great project and thank you for that awesome work.
Today if I add a view, it's placed at the second position in the control no matter the way it's added (insert or add) to the list if the desired index in greater than 0.
I'm binding the itemsSource of the TabablzControl to an ObservableCollection of views and I want my tabs to be synchronized with that ObservableCollection.
For example if I add a view to the bound list, I would like it to be at the end in the control. Also if I move a tab in the control I would like to reflect that on the bound list.
Maybe it is currently possible but I don't found the way to achieve that.
Is this a bug or am I misunderstanding? I had dragged out multiple windows and the suffix content was not always showing. I would expect the content always.
I included this xaml
<Style TargetType="{x:Type dragablz:TabablzControl}" x:Key="BasicExamplesTabStyle">
<Setter Property="Margin" Value="8 8 8 8" />
<Setter Property="HeaderSuffixContent">
<Setter.Value>
<StackPanel Orientation="Horizontal" Height="18"
ToolTip="Powered by Dragablz">
<Path Stretch="Uniform" Fill="{DynamicResource AccentColorBrush}"
Data="F1 M 0,10.7852L 14.0247,21.5698L 14.0247,14.7494L 26.8469,14.7494L 26.8469,6.82025L 14.0247,6.82025L 14.0247,0L 0,10.7852 Z "/>
<TextBlock Margin="4 0 0 0" Text="Drag me"/>
</StackPanel>
</Setter.Value>
</Setter>
</Style>
I'm doing a project where I'm trying to integrate this into a Prism (https://compositewpf.codeplex.com/) app. I love the drag feature on the tabs, but managing state with the Prism Region API is being problematic when a tab is dragged from one tab control into another (either new or existing). It would be really helpful if the control would emit an event so that I could handle the state change properly.
The things I would be interested in are:
Thanks
Hello.
I have an application that contains not only tabcontrol, so i've overrided behaviour, that main window stay alive but child windows close.
So there was a situation, when i need to drop a tab item on the tabcontrol in mainwindow which is empty, and i couldn't do it.
Could you please add this behaviour?
When using the example DragablzWindowApp project, I have a custom user control that I am trying to host in a WindowsFormsHost. The custom user control does not appear when the main window is a DragablzWindow.
The form works as expected when I change the inheritence of the main window to a System.Windows.Window.
Current behavior is to quit the application when closing all TabItem, because this control must be able to close current parent window on multiple window when using tearable option.
But its when there is only one window, its kinda weird, closing all TabItem = closing application.
Should we put multiple window validation before calling window.Closes()?
Cheers
Is it possible to create a multiple process for multiple tab like google chrome. I have tested your system and it is handling all tabs using single process. Will it be possible to do multi-process for each tab that is created dynamically.
Hi, I wish you give such possibility, because I think its not so convenient when pressing add button make this button move. It should be pinned and placed at the right side like in web browsers. So, creating few tabs one after another will not need to move mouse and chase for the button.
What do you think?
Hello,
First of all, great work for this library. It is very powerful.
I begin a new wpf project and I integrate it.
I have my MainWindows.xaml with a ContentControl where the source is updated by a binding with MainViewModel.
Thanks to this ContentControl and the binding, I manage the navigation into my app.
When I click on a button, I change the source of the ContentControl and switch to a new HomeView ( a user control).
Into this HomeView, I put a dragablz with some tabs. However, when I drag out a tab, I got a exception and it doesn't create the new windows. I don't understand why because if I move the code directly to MainWindows, it's working.
I hope you will help me to understand where is the issues.
Best regards,
Dragablz is amazingly slick.
However, I can cause the StylezApp example to crash.
Drag one of the Introduction tabs to dock it in the bottom half of the window. Then click the Add tab button. It crashes because NewItemFactory is not set.
Perhaps DefaultInterLayoutClient should copy the NewItemFactory property. Whilst we're at it, it also seems like DefaultInterLayoutClient doesn't copy the InterTabClient, at least if it was InterTabClient was set with a XAML binding. Can this be fixed, or is there no good solution when those properties were set in XAML as bindings?
I tried running the "DragablzSamplez-master" demo. It works great until add new tab button is clicked on newly created window. "Add New" button only works in default window and if it is executed from new window it throws "An unhandled exception of type 'System.InvalidOperationException' occurred in Dragablz.dll".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.