These are chat archives for ButchersBoy/Dragablz

24th
Sep 2015
Pranav Ramarao
@pranavr93
Sep 24 2015 10:11
Hey
James Willock
@ButchersBoy
Sep 24 2015 10:12
Yo
Pranav Ramarao
@pranavr93
Sep 24 2015 10:12
So I have a WPF application which makes use of tabs
Lets say all the tabs make use of a central data. ( Backend)
When I separate a tab out, you create a new process for that tab right?
James Willock
@ButchersBoy
Sep 24 2015 10:14
No. Single process.
Pranav Ramarao
@pranavr93
Sep 24 2015 10:14
So can the new tab still access all the data in memory for the parent tab?
James Willock
@ButchersBoy
Sep 24 2015 10:14
Yes.
Pranav Ramarao
@pranavr93
Sep 24 2015 10:14
Oh okay
And how hard is it to completely replace a previous tab implementation with yours?
James Willock
@ButchersBoy
Sep 24 2015 10:15
...depends on your code base!
😉
Are you mvvm ?
Pranav Ramarao
@pranavr93
Sep 24 2015 10:15
yes
James Willock
@ButchersBoy
Sep 24 2015 10:15
To get the basic tearing tab is pretty simple
Pranav Ramarao
@pranavr93
Sep 24 2015 10:16
I get a crash when I try tearing with my app :(
James Willock
@ButchersBoy
Sep 24 2015 10:16
Layouts (splitting) gets a little more complicated
Have you started by running any of the samples? Get a feel fur the api, then see how it fits your app.
Pranav Ramarao
@pranavr93
Sep 24 2015 10:17
Yes, I have taken a look at most of the demos
James Willock
@ButchersBoy
Sep 24 2015 10:17
So what's your error? Something in your code or dragablz?
Pranav Ramarao
@pranavr93
Sep 24 2015 10:17

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll

Additional information: Exception has been thrown by the target of an invocation.

I get this when I try to tear a tab and separate it from the application
James Willock
@ButchersBoy
Sep 24 2015 10:18
Stack? What is your items source?
Pranav Ramarao
@pranavr93
Sep 24 2015 10:18
Operation is not valid while itemsSource is in use
at System.Windows.Controls.ItemCollection.Clear()
at Dragablz.DefaultInterTabClient.GetNewHost(IInterTabClient interTabClient, Object partition, TabablzControl source) in C:\projects\dragablz\Dragablz\DefaultInterTabClient.cs:line 25
at Dragablz.TabablzControl.MonitorBreach(DragablzDragDeltaEventArgs e) in C:\projects\dragablz\Dragablz\TabablzControl.cs:line 1050
at Dragablz.TabablzControl.ItemDragDelta(Object sender, DragablzDragDeltaEventArgs e) in C:\projects\dragablz\Dragablz\TabablzControl.cs:line 969
My items source is an ObservableCollection of a custom class
which inherits UserControl and INotifyPropertyChanged
James Willock
@ButchersBoy
Sep 24 2015 10:39
Ok, try with latest nuget package.
I suspect, at some point you might want to look into implementing your own IInterTabClient, so have a look at that interface.
Pranav Ramarao
@pranavr93
Sep 24 2015 10:42
hmm okay
But where do you think the problem is?
is it on my side of things?
Hey! I got the latest nuget and it doesn't crash now!!
Pranav Ramarao
@pranavr93
Sep 24 2015 10:47
though there is one minor problem
When I tear a tab, it moves rapidly and creates multiple windows o.O
James Willock
@ButchersBoy
Sep 24 2015 10:54
Have you got something intercepting any mouse activity?
Pranav Ramarao
@pranavr93
Sep 24 2015 10:59
Let me check
I don't there is one
don't think*
Could you tell me what happens when I start tearing a tab?
That way, I can figure out what is going wrong
Pranav Ramarao
@pranavr93
Sep 24 2015 11:04
Currently, it looks like it just replicating the parent tab and creates multiple versions of it
And in no time, I have about 50 of those separate tabs open
James Willock
@ButchersBoy
Sep 24 2015 11:39
A new window should be created when the mouse leaves the tab, and then the mouse is captured on the new window, and then the new window starts moving with the mouse. ...Can you create a demo project that relates the issue?
...Maybe it's something to do with mouse capture on your window. Do you b have a custom window or anything like that?
Any adorners that could interfere?
Or
Something in your code that is generating a new window
How do you create Windows?
Anything in your window load event?
Pranav Ramarao
@pranavr93
Sep 24 2015 12:09
I will check it out and get back to you. Thanks a ton for the help so far. I still have some queries. Will get back to you in a while :)