Just need to use (e.Source is Dragablz.TabablzControl) instead of TabControl
would be nice this in the documentation
Artur
@l1pton17
I have multiple tabablz controls in my application. and i can't move the last tab in some tabablz. when i try to do it, it just moves the hole window. is there any way to make it?
James Willock
@ButchersBoy
Hmmm.... Should only move the Window if there is a single tab... Sounds likea bug...
Magnus Lindhe
@mgnslndh
Hey @butchersboy! You remember if you've changed background styling of Dragablz TabItem used with Material Design Toolkit?
I just upgraded from .150 to .170 and TabItem placed in a card that used have the card background now has the default background color instead.
Magnus Lindhe
@mgnslndh
Could also be i'm doing some styling that no play well with the new version :)
Magnus Lindhe
@mgnslndh
Changing background on the TabControl did the trick.
Shawn Anderson
@shawnmanderson
So I got a strange one - back in Dec there was a commit that modifies enabled state (ButchersBoy/Dragablz@860cbab). This is a good change and was actually committed by a coworker of mine. However I'm running into VERY rare situations where a closing tab gets exceptions when the enabled state is set (at MS.Win32.UnsafeNativeMethods.EnableWindow(HandleRef hWnd, Boolean enable) at System.Windows.Interop.HwndHost.OnEnabledChanged, The parameter is incorrect) - probably because the window handle is either ending up null or invalid by the point the code executes. Thoughts? I don't want to remove the code, but right now I'm considering forking and just having a hack try/catch around it. the only other thought I had was to somehow add a boolean property to conditionalize setting the child.IsEnabled, but that seemed like major overkill.
James Willock
@ButchersBoy
@shawnmanderson how reproducible is this?
I guess very rare :)
Shawn Anderson
@shawnmanderson
@ButchersBoy its tough because it has to do with WinFormsHosts, old tech, and a combination of citrix remote deskop applications :) I could try to create an application that reproduces it, might be a weekend task
James Willock
@ButchersBoy
Ooooh. Citrix and WinForms. Ha. Nasty combination.
bebenins
@bebenins
Hi James... Question. For some reason TabItem's IsEnabled property doesn't work inTabablzControl. Is that just because it wasn't implemented? If yes, is there a plan to do so?
Thanks!
James Willock
@ButchersBoy
@bebenins yep, it's not implemented, because it doesnt really make sense in a scenario where you can tear tabs off...you can still be left wiith a window with your single disabled tab...which would be a wierd user experience....doesn't mean you cant disable your content though
bebenins
@bebenins
@ButchersBoy I understand your reasoning for tearing off tabs off. In my case though, they are fixed and I trigger events (reading HW registers) when a tab is selected. But before HW is initialized, I must prevent the user from selecting certain tabs because if a tab is selected during init, there will be register access clashes. So I guess I can put some kind of "blanket" over tabs I don't want to be clicked. Anything else you can suggest? Thank you!
In the example above, the Firmware and Diags tabs must always remain enabled while others have to be controlled.
_
James Willock
@ButchersBoy
But can't you manage that in your view models (assuming you are using MVVM). If a tab isn't yet initialise, just show some temporary "loading" indicator?
bebenins
@bebenins
Yea, I can do something like that.... Will try it. Thanks!
Muzaffa
@Muzaffa
This message was deleted
James Willock
@ButchersBoy
At
Johan Larsson
@JohanLarsson
dunno if ^ is intentional
B3NNITH
@Bennith
Great framework you have developed @ButchersBoy. I use FontAwesome in my WPF app with Dragablz.Mahapps.MaterialDesigns and is it possible to have font awesome icon in my tabItem header text?
James Willock
@ButchersBoy
@Bennith yes... You don't have to put text in there, usual WPF rules apply. You could put a grid, or an object with available data template
Svetlozar Stoichkov
@svstoichkov
Hello! I am binding TabablzControl to an observable collection in my view model. How can I change the header content of each tab? With the regular TabControl I can set an ItemTemplate, but it doesn't appear to be working with TabablzControl. Thank you
Scyssion
@Scyssion
You can make a DataTemplate for the Header content such as:
ButchersBoy/Dragablz#117 Any update on this issue?
My MainWindow is a MetroWindow Control that could be the issue
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Window', AncestorLevel='1''. BindingExpression:Path=Background; DataItem=null; target element is 'TabablzControl' (Name=''); target property is 'Background' (type 'Brush')
James Willock
@ButchersBoy
added a comment
Alejandro Alvarez
@alealvarez14
Hi, first of all, great work!. Unlucky me, I have an issue here. First, I have a MainWindow with a main tab. Then, this main window has a floating item list, which at certain point I add a tab to it. Up to this point it works perfect. When I expand the floating item, and a window is created, whenever I try to dock it to main window, it shows an empty tab, and my tab (without header). I'm using MVVM pattern with MVVMLight toolkit. Any suggestions?
James Willock
@ButchersBoy
Uhm....
You probably will have to post a repo
Alejandro Alvarez
@alealvarez14
quick question, maybe it'll help you, help me out. In my mainwindow, I have a DataContext bound to it (ViewModel1). And the new window, has another, completely different view model attached to it (ViewModel2). Maybe, when I dock the new window in a split view, because it has ViewModel2, MainWindow does not recognizes this view model?
James Willock
@ButchersBoy
Yes... You have to be very careful with your data context. 1. Use Snoop to double check what you have. 2. For any non trivial scenario you probably need to implement a IInterTabClient.
Alejandro Alvarez
@alealvarez14
Ok thanks
I also downloaded the Doobry repo. And in some scenarios, it happens quite the same bug.
James Willock
@ButchersBoy
Can you record a gif of it happening in doobry?
Michael Plainer
@plainerman
In your "BasicExampleWindow" - demo you have a horizontal and a verticalorganiser. Is there a way to make a vertical and horizontal organiser? For example you have a 3 by 3 grid, where each element can be positioned individually (and the first element of the first row could theoretically be changed with the last element of the last row)?
James Willock
@ButchersBoy
do you mean like a wrap panel?
Michael Plainer
@plainerman
Yes, the arrangement of a wrappanel would also be suitable, but is it possible to drag the items freely and not only in one direction?
Similar to a canvas organiser but with auto align and transitions