These are chat archives for ButchersBoy/Dragablz

Jul 2017
Jul 20 2017 11:47
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
Jul 20 2017 12:54
@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.
Jul 20 2017 13:01
@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>
<TextBlock Text="{Binding PageTitle}"/>
I forget where I found it but I think it was in one of the demos
Loyal Servant
Jul 20 2017 13:09
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:
<Setter Property="CustomHeaderItemTemplate">
<DataTemplate DataType="{x:Type common:TabContent}">
<TextBlock Text="{Binding Header}" />
Loyal Servant
Jul 20 2017 13:16
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