I want to make a tab control like this, how can I do that?
tbone897
@tbone897
when switching tabs, how do I get the currently selected tab? Tried using tabablzControl_SelectionChanged event and getting the active tab Object selectedTab = tabablzControl.SelectedContent;
but I always get the previous selected tab, the tabablzControl_SelectionChanged event is firing before the tab changes. any ideas?
Talha Talip Açıkgöz
@Talha-T
this is probably the worst way but, maybe wait for a period then get selectedtab?
but as I said, this is probably the worst way
James Willock
@ButchersBoy
Might be
Better to dispatcher.begininvoke
Talha Talip Açıkgöz
@Talha-T
@ButchersBoy How can I make a template like above?
James Willock
@ButchersBoy
There is a style for that... Have you seen the MahApps mashup demo in the MDIX source?
Talha Talip Açıkgöz
@Talha-T
I didn't. Do I have to Install MahApps for that or not?
@ButchersBoy do you have a built-in way to stretch the tabs across the available width of the TabablzControl? I found some width converter solutions online, but I thought I'd check with you first to see if you've already addressed it.
Christian Käser
@dfyx
@ButchersBoy Just a quick question. I replaced a TabControl in my existing application with a TabablzControl and added a default InterTabController. So far everything works fine apart from the fact that none of the buttons in my custom headers are clickable. Is there anything I need to change?
James Willock
@ButchersBoy
Yes... The headers have thumbs, to ever the dragging. So if you have buttons in headers you need to specify the Thumb manually. In the source check CustomerHeader.xaml
Christian Käser
@dfyx
Ah, alright, I missed that
Now it works
Thanks
Greg Dennis
@gregsdennis
@ButchersBoy ping
_
James Willock
@ButchersBoy
@gregsdennis no, that's not supported
Greg Dennis
@gregsdennis
Thank you.
James Willock
@ButchersBoy
But you could probably have a go at writing your own IItemsOrganiser... That is pluggable
Loyal Servant
@LoyalServant
Greetings all, does anyone know of a sample using mvvmlight? I am stuck and could use the nudge.
Edward Akers
@Winter
I can only imagine how many times this question has been asked but I'm sorry I have to ask it: Can I use Dragablz on winforms? The project I'm working on is already tailored to winforms
James Willock
@ButchersBoy
With great great pain
@WinterAU
jk33
@jk33
Good Day. I was wondering whether it was possible to bind the visibility of the close button on a tabablz control to the view model in an mvvm application
@LoyalServant I have managed to get this to work with Mvvmlightlibs and I'm happy to be of assistance should you still have a problem
Loyal Servant
@LoyalServant
@jk33 do you have anything online I can take a look at by chance? Part of my issue is trying to work out whether or not I should use the view model locator in mvvmlight or set the datacontext myself. it's been a few days since I looked at this so I don't recall what I had working but I do know that I never got the text on the tabs to work but had some success with the viewmodels.
jk33
@jk33
@LoyalServant Unfortunately I don't have anything online at this point but I had the same problem and solved it with the following XAML in the tabablz control: <dragablz:TabablzControl.HeaderItemTemplate> <DataTemplate> <TextBlock Text="{Binding PageTitle}"/> </DataTemplate> </dragablz:TabablzControl.HeaderItemTemplate>
I forget where I found it but I think it was in one of the demos
Loyal Servant
@LoyalServant
yeah that is in app.xaml i believe. I already have that. It must be some binding issue I just haven't sorted it out.
no, i'm wrong. let me try yours.
yeah, that was it. in the example there is a class called tabcontent that has a property called header
but, i would have thought the following in app.xaml would have taken care of that:
Now, my only issue is when dragging a tab away that it creates any number of copies of itself as long as you have the left mouse button down. that one is just strange.
it never actually drags it away, new windows are created underneath. seems like a weird focus issue
Abdullah Farooq
@sunnygb
Assalam O alikum guyx
Thank u guyx for ur beatiful Tabcontrol.
Recently i got myself into an awful problem
im new to wpf and xaml
but heres my problem
my viewmodel is showing right into dragable tabs :(