Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ray Tang
    @raytangRT
    Hi all, I saw the MDI demoe, and wondering if I can drag the child out
    dust63
    @dust63
    Hi everyone, Is there a built in mechanism to save the current layout ?
    Loyal Servant
    @LoyalServant
    @ButchersBoy sorry for the late reply.. very late. Adding to a collection. I have done this in app.xaml: <Setter Property="SelectedItem" Value="{Binding ActiveTab}"/> and it "works" but I can't work out how to bind properties like SelectedItem or ShowDefaultCloseButton to the collection like the HeaderItemTemplate or the ContentTemplate are. In the case of the ShowDefaultCloseButton is all or nothing where I would like to be able to control individual tabs. I am using the same code you have @ https://github.com/ButchersBoy/DragablzSamplez/blob/master/DragablzWindowApp/App.xaml
    Jérémy VIGNELLES
    @jeremyVignelles
    Hi, I see a lot of people asking for the ability to save/restore the layouts. I also find myself in that situation, and I'd like to contribute on that (no promises though). Does anyone think of anything that I must be careful about (potential issues, mandatory feature...)
    Imad Lekal
    @Imadlekal

    Hello,

    am I the only one who can't select controls inside the Dragablz tabs while I'm on Visual studio?

    I would appreciate it If someone could point to a fix or workaround
    bebenins
    @bebenins
    @Imadlekal
    No workarounds. Just have to scroll through XAML manually
    Imad Lekal
    @Imadlekal
    @bebenins I appreciate the answer, thanks
    TekuSP
    @TekuSP
    Hi! Can anyone explain me why MaterialDesign version has fixed 100 px width on TabItem? https://i.imgur.com/9oEsVFA.png
    But not skinned one works OK? https://i.imgur.com/clAlEPn.png
    I tried looking into XAML, but I can't find element which causes this. Anyone had similar problem in past?
    https://i.imgur.com/gZmfFOH.png Looks like DragablzItem has MinWidth 80, but I cant remove it through Custom Styling... Any tips?
    Maulwurf112
    @Maulwurf112
    @ButchersBoy
    Hello James,
    i use TabablzControl in a application with a MahApps MetroWindow. Now i want combine the transparent window feature (when i drag a tab to another window) from dragablz.Window with the style from MetroWindow.
    For this i create a new window class that inherit from MetroWindow and add your code for "IsBeingDraggedByTab" Property and drag events. I also create adjusted styles and control templates for the new Window class.
    It works great...When I drag a tab to another window, the border and titlebar is transparent like dragablz.Window. Now Problem... When I maximize the window (over button or double click), the content doesn't update, means the tabcontrol inside stay on his former size and doesn't react. I get big border on buttom and right side.
    When i resize the window with the mouse on the corners it works fine. Do you have an idea, what is the problem? Thanks in advances!
    Image from Window...https://imgur.com/a/Gat96gN
    berge2007
    @berge2007

    Hello Coders,
    For example I have 2 different ViewModel class like VM1, VM2 and I have two different UserControl based View class like V1 and V2. V1's job is to display data of VM1 and V2 will display datas of VM1. I'd like to put the V1 and V2 into different Dragablz Tab.

    in *.CS:
    
    Tabs.Add(new Dragablz.HeaderedItemViewModel()
    {
        Header = "Tab1",
        Content = new ViewModel1()
    });
    
    Tabs.Add(new Dragablz.HeaderedItemViewModel()
    {
        Header = "Tab2",
        Content = new ViewModel2()
    });
    
    in *.xaml:
    
     <dockablz:Layout>
            <dragablz:TabablzControl
                x:Name="tabControl"
                ItemsSource="{Binding Tabs}"            
                Margin="8"
                UseLayoutRounding="True"
                ShowDefaultAddButton="False"
                ShowDefaultCloseButton="True"
                ClosingItemCallback="{Binding ClosingTabItemHandler}"
                HeaderMemberPath="Header"
                DisplayMemberPath="Content"           
                >
                <dragablz:TabablzControl.InterTabController>
                    <dragablz:InterTabController ></dragablz:InterTabController>
                </dragablz:TabablzControl.InterTabController>
            </dragablz:TabablzControl>
        </dockablz:Layout>

    How could I bind together the corresponding ViewModels and Views on the tabs? (On "Tab1" should display a View1 which is binded to Tab1's Content (a ViewModel1 object)

    I think TabablzControl's ContentTemplate not going to work because I have different View types and different ViewModel types.

    Every example on the Internet (what I did found) was "Hello world" level, or hard coded in XAML with "TabItem" tags

    Jérémy VIGNELLES
    @jeremyVignelles
    You will probably need to abstract a common higher level for ViewModel1 and ViewModel2 I suppose
    something like IViewModel that would be implemented by both?
    or you can pass them both as "objects"
    but you will need to override somthing to create your view, I don't remember what, but I'm pretty sure there's something to create the tab items the way you want
    berge2007
    @berge2007

    Content is Object so it does not count that VM1 or VM2 has a common IViewModel interface or not

    (note:this is Dragablz code):

    #region Assembly Dragablz, Version=0.0.3.203, Culture=neutral, PublicKeyToken=null
    #endregion
    
    using System.ComponentModel;
    using System.Runtime.CompilerServices;
    
    namespace Dragablz
    {
        //
        // Summary:
        //     Helper class to create view models, particularly for tool/MDI windows.
        public class HeaderedItemViewModel : INotifyPropertyChanged
        {
            public HeaderedItemViewModel();
            public HeaderedItemViewModel(object header, object content, bool isSelected = false);
    
            public object Header { get; set; }
            public object Content { get; set; }
            public bool IsSelected { get; set; }
    
            public event PropertyChangedEventHandler PropertyChanged;
    
            protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null);
        }
    }

    So the question is, how could I tell to TabablzControl that use View1 class if the Content is ViewModel1?

    Jérémy VIGNELLES
    @jeremyVignelles
    What gets displayed when you run your code? the view model's ToString()/the viewModel type?
    If so, I guess that you can use a DataTemplateSelector to create your views
    berge2007
    @berge2007

    Like that:

        <dockablz:Layout>
            <dragablz:TabablzControl
                x:Name="tabControl"
                ItemsSource="{Binding Tabs}"            
                Margin="8"
                UseLayoutRounding="True"
                ShowDefaultAddButton="False"
                ShowDefaultCloseButton="True"
                ClosingItemCallback="{Binding ClosingTabItemHandler}"
                HeaderMemberPath="Header"
                DisplayMemberPath="Content" 
                >
                <dragablz:TabablzControl.InterTabController>
                    <dragablz:InterTabController ></dragablz:InterTabController>
                </dragablz:TabablzControl.InterTabController>
                <dragablz:TabablzControl.ContentTemplate>
                    <DataTemplate DataType="{x:Type MyNamespace:ViewModel1}">
                        <MyNamespace:View1 />
                    </DataTemplate>
                    <DataTemplate DataType="{x:Type MyNamespace:ViewModel2}">
                        <MyNamespace:View2/>
                    </DataTemplate>
                </dragablz:TabablzControl.ContentTemplate>
            </dragablz:TabablzControl>
        </dockablz:Layout>

    ?

    berge2007
    @berge2007
    But maybe I could not explain myself very well so back to the basics:
    For example I'd like to create a desktop app for a "Rent-a-vehicle" company. Workers would like to fill up the database with vehicles and more other things. There are different vehicles with different parameters, for example bicycle, quads, e-tricyle, jet-ski, protective accessories/gears, etc. So almost every item type needs a special form to fill up. I'd like to show theese forms as tabs. If a customer/"renter" come in to the shop the worker will click on the "Rent" menu and a new tab will shows up with a renting "form".
    Which would be the right method to achive that funcionality with "Dragablz" tabs?
    Jérémy VIGNELLES
    @jeremyVignelles
    I'm not really sure of how to do with DataTemplate, maybe you'll need a ContentControl for that
    I don't know if there's a right method to do that
    you should be able to put your control as Content too I guess
    it's just wild guesses, it's up to you to try and find out, or wait for anyone else here that could help
    Andrew Herrick
    @aherrick
    Hi - Anyone having any thoughts here? Just trying to show a basic tooltip
    mxvlshn
    @mxvlshn
    Hi guys
    is there any possibility to manage order of the tabs in tabcontrol?
    customer want to restore tab orders from previous session after application startup
    mxvlshn
    @mxvlshn
    @jeremyVignelles hi
    Jérémy VIGNELLES
    @jeremyVignelles
    hi
    mxvlshn
    @mxvlshn
    @jeremyVignelles have you managed to create save/restore of tab orders in dragabz?z
    Jérémy VIGNELLES
    @jeremyVignelles
    I guess my PR does that, did you try it?
    mxvlshn
    @mxvlshn
    @jeremyVignelles what is PR?
    Jérémy VIGNELLES
    @jeremyVignelles
    it was a long time ago and never managed to have time to integrate it in my app
    mxvlshn
    @mxvlshn
    you mean pull request?
    Jérémy VIGNELLES
    @jeremyVignelles
    yes
    mxvlshn
    @mxvlshn
    i will check thanks
    Michael Heinrich
    @pinki
    Hi, I have a CompositeCollection as TabablzControl.ItemsSource. Inside this collection there are items of 2 different data types. How can I provide different DataTemplates for both TabablzControl.HeaderItemTemplate and TabablzControl.ContentTemplate?
    Michael Heinrich
    @pinki
    I realized it with a pair of ContentPresenters.
    EscoMar
    @EscoMar
    Hi ! Is there anybody ?
    I tried to apply this tutorial https://dragablz.net/2015/01/26/mdi-in-wpf-via-dragablz/ but my "Tile Grid", "Tile Horizontal" and "Tile Vertical" buttons are looking like enabled and nothing happened...
    How deals with that ? thanks
    pm64
    @pm64
    I noticed that when a tab is selected in codebehind, the selected tab is somewhat highlighted, but does not appear "fully selected", as it would if it were clicked on. Does anyone know how to make a tab that is selected in this manner appear as though it had actually been clicked?
    CapnKronic
    @CapnKronic
    Anyone know why I get a logical child exception when I try to add an existing floating item to the tab control? Is it somehow because I added them from the viewmodel constructor? I’m bound to two observable collections and can drag to the floating dock without problem. Taking a tool item the other way... not so much. I’m coding this in VB and having trouble extrapolating from the limited references I’ve found.