Comments (4)
Ideally an implementation of IInterTabClient
client should give you a hook. Perhaps in your case you want to implement IManualInterTabClient
. This would allow you to manually remove from one source and add to another. This is the preferred way to jump in and manage your source collections manually.
There are also several events on the items themselves:
- DragablzItem.DragStarted
- DragablzItem.PreviewDragDelta
- DragablzItem.DragDelta
- DragablzItem.DragCompleted
You might want to use EventManager.RegisterClassHandler
to create a hook.
Also, have you seen this test project? https://github.com/tstephansen/PrismExample
See where you can get by implementing IManualInterTabClient
and exposing it on the InterTabController
. Then if you are still stuck if you can post a little test project on GitHub I'll see if I can help you get it running.
from dragablz.
Is there an example of the ManualInterTabClient? I tried looking at the examples to see if there was a sample implementation, because just implementing IManualInterTabClient, I started getting the exception below as soon as the tab was dragged out of the original Tab Control.
System.NullReferenceException: Object reference not set to an instance of an object.
at Dragablz.DragablzItemsControl.InstigateDrag(Object item, Action`1 continuation) in c:\projects\dragablz\Dragablz\DragablzItemsControl.cs:line 185
at Dragablz.TabablzControl.ReceiveDrag(InterTabTransfer interTabTransfer) in c:\projects\dragablz\Dragablz\TabablzControl.cs:line 970
at Dragablz.TabablzControl.MonitorBreach(DragablzDragDeltaEventArgs e) in c:\projects\dragablz\Dragablz\TabablzControl.cs:line 939
at Dragablz.TabablzControl.ItemDragDelta(Object sender, DragablzDragDeltaEventArgs e) in c:\projects\dragablz\Dragablz\TabablzControl.cs:line 859
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
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 e)
at Dragablz.DragablzItem.ThumbOnDragDelta(Object sender, DragDeltaEventArgs dragDeltaEventArgs) in c:\projects\dragablz\Dragablz\DragablzItem.cs:line 493
at System.Windows.Controls.Primitives.DragDeltaEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
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 e)
at System.Windows.Controls.Primitives.Thumb.OnMouseMove(MouseEventArgs e)
at System.Windows.UIElement.OnMouseMoveThunk(Object sender, MouseEventArgs e)
at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
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.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
--- End of inner exception stack trace ---
from dragablz.
OK...can you send me a project? it's the quickest way for me to fix the bug and see where you're at.
from dragablz.
I created a sample project at https://github.com/svantreeck/DragablzPrism that I think I got working. I was originally using a Dictionary to map the region items to their owning TabablzControl, but now I'm keeping track of a list of open tab controls and looping through them. It's less efficient than I wanted it to be, but in reality, at most I see probably a dozen or so items open, so O(1) vs O(N) isn't a big deal for finding the proper tab control.
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.