Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    summerwind78
    @summerwind78
    just a question, I am pretty new in Dragablz. Is there any possibility to have a complete fixed position ofr the tabs, disabling drag and drop?
    bebenins
    @bebenins
    @summerwind78 I believe you just have to add a dummy FixedHeaderCount and set it to some number <dragablz:TabablzControl FixedHeaderCount="10"/>
    summerwind78
    @summerwind78
    thank you
    Vivamort
    @Vivamort
    Thanks for all of this - Dragablz is a great control.
    Has anyone added a drop down list (showing all the open tabs) to the control so that users can select a tab from the list rather than having to scroll to find it and then select it?
    shazoo1
    @shazoo1
    Hi everybody! In my project I use a service to show dialogs, and I want this service to select an appropriate ViewModel type based on the user input, after an AddNewTab button is clicked. The point is to create a new tab with a model, selected from a dialog service. I already have an instance of this service in my app, so I don't want to create a new one in NewTabFactory. The ViewModel types are already derived from Prism MVVM BindableBase, hence I can't derive from a HeaderedViewModel to pass the desicion about the VM type somewhere else. How can I select between different VM types in NewTabFactory?
    I have several ideas:
    1. Move the visual selection logic from the dialog service to the NewTabFactory
    2. Create a totally new addition button somewhere else and handle tab addition outside NewTabFactory
    3. Somehow bind to the addition button (not sure, if it is possible)
      I lean towards 2, but I'd really like to use a draggablz button
    shazoo1
    @shazoo1
    Nevermind; found solution for this:
    <dragablz:TabablzControl.HeaderSuffixContent>
    <Button Command="{Binding AddNewViewModel}">+</Button>
    </dragablz:TabablzControl.HeaderSuffixContent>
    Daniel Klecha
    @danielklecha
    Hi All!
    I saw that there is no change since two years.
    I want to use it in .NET Core so I'm waiting for #232.
    @ButchersBoy Is there a change that you will add new commits?
    Anyway, control is great.
    Jérémy VIGNELLES
    @jeremyVignelles
    @danielklecha I don't think there will be any change anytime soon, his github profile states "taking a break from open source"
    krezs
    @krezs
    Hello!, Is there a way to make a vertical and horizontal organiser?
    Daniel Klecha
    @danielklecha
    @krezs I think that demo app contains example with horizontal and vertical tabs.
    But there is no option to group tabs or click some button to see list with all tabs.
    If somebody has a problem to combine dragablz with caliburn micro then I created sample with custom IInterLayoutClient and IInterTabClient.
    Happy coding!
    DragablzCaliburnDemo
    Dan Bourquin
    @bourquin.dan_gitlab
    Hey everyone, I don't understand how OrderChanged event work on VerticalPositionMonitor. I have binded the ItemsSource to my viewModel List and when I create the list I receive my list.count -1 event. Is there a way to not receive these event at initialization ?
    Jérémy VIGNELLES
    @jeremyVignelles
    How do you initialize your collection in your item source?
    Dan Bourquin
    @bourquin.dan_gitlab
    I tried diffents ways. By makind source = new List<object>(); then source.Add(new object()). Or by making var newSource = new List<object>() then newSource.Add(..) and finally source = newSource;
    Jérémy VIGNELLES
    @jeremyVignelles
    OK. Sorry, but I don't know
    Dan Bourquin
    @bourquin.dan_gitlab
    Do you think it's a normal behaviour?
    Jérémy VIGNELLES
    @jeremyVignelles
    I don't know how it's implemented... Does it work the same way in horizontal?
    however, I doubt you'd get any help if you post an issue on that project...
    Dan Bourquin
    @bourquin.dan_gitlab
    (Je suppose que c'est le même fonctionnement entre l'horizontal et le vertical, pourquoi je n'aurai pas de réponse pour ce projet?)
    Jérémy VIGNELLES
    @jeremyVignelles
    (Parce que le développeur principal n'est plus actif depuis plusieurs années à ce que je sais...)
    Dan Bourquin
    @bourquin.dan_gitlab
    Okay thank you for these informations =)
    Schachfigur
    @Schachfigur

    Hey, may a simple Question but i've tried all examples and dont get it...
    I Want to override the "ItemContainerStyle" (I think its the right property), because i want to change the tab header highlight. But i dont get it work...
    In my Application.xaml (vb.net project)

                <Style x:Key="DragItemContainerStyle" TargetType="{x:Type dragablz:DragablzItem}">
                    <!-- the changes are just to see if the style is applied, but i dont seem so -->
                    <Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
                    <Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
                    <Setter Property="Background" Value="Red"/>
                    <Setter Property="BorderBrush" Value="Red"/>
                    <Setter Property="themes:MaterialDesignAssist.IndicatorBrush" Value="Red" />
                    <Setter Property="Margin" Value="0 0 0 0"/>
                    <Setter Property="Padding" Value="8"/>
                    <Setter Property="MinWidth" Value="80" />
                    <Setter Property="Height" Value="40" />
                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
                    <Setter Property="VerticalContentAlignment" Value="Center"/>
                    <Setter Property="TextBlock.FontWeight" Value="Medium" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
                                <!-- 1:1 from Dragablz Source copied -->
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
    
                <Style TargetType="{x:Type dragablz:TabablzControl}"
                       BasedOn="{StaticResource MaterialDesignTabablzControlStyle}" >
                    <Setter Property="ItemContainerStyle" Value="{StaticResource DragItemContainerStyle}" />
                </Style>

    The Material Design Dragablz Style is applied, but not my ItemContainerStyle. Do I Need to overwrite the complete template of the TabablzControl to set the itemContainer Style there? (It seems possible, but it would be a big block of copy-paste just for changing one singe line)...

    MayrMichael
    @MayrMichael
    Hey, how should i implement your tab control when i want creat the tabs during runtime from a viewmodel? I tryed it with a viemodel, this was binded to the itemsscourc from the tab control, but when i drag the window out the tabs where on both.
    Daniel Klecha
    @danielklecha
    @MayrMichael Did you used ObservableCollection<T> in VM? If you tear out tab then it should be removed from original list and added to new window.
    You can check my demo but it require caliburn micro so it's more complex solution.
    Hasan Javaid
    @mhasanj
    Hi.
    Is it possible to hide close button on specific tab item.
    Hasan Javaid
    @mhasanj
    anyone help me ?
    2 replies
    Daniel Klecha
    @danielklecha

    @mhasanj Hi. Please check the demo app.
    There is information about custom header here.
    So you can add custom button with command from dragablz.
    This button can be hidden using visibility property so you must add binding to model property.

    Second option is to ignore default mechanism, use caliburn micro and add a button which will call method from VM and pass item as parameter. This allow you to remove item from observable collection.
    Anyway, you must hide this button using visibility property too.

    Shreyasj96
    @Shreyasj96
    Hi guys, Does anyone how to get the close command for dragablz tab. I want to check some conditions before closing the tab but the showdefaultclosebutton is directly closing the tab.
    Jérémy VIGNELLES
    @jeremyVignelles
    @Shreyasj96 : Create your own close button, with the info daniel gave just above ?
    Shreyasj96
    @Shreyasj96
    @jeremyVignelles But it uses a usercontrol, is there an alternate way to define in window.xaml itself
    Jérémy VIGNELLES
    @jeremyVignelles
    I'd argue it's a best practice to have a UserControl. It might be doable without, but I didn't take time to think much about it
    Shreyasj96
    @Shreyasj96
    @jeremyVignelles Ok, let me try that approach. Thanks
    Hasan Javaid
    @mhasanj
    @danielklecha Hi. Is it possible without Command and MVVM.
    Is it possbile to capture close button event ?
    Shreyasj96
    @Shreyasj96
    Hi. Is there a way to increase the tabitem width. I'm creating the tabs dynamically and setting the tabitem content in code. For some reason the width of the tabitem is not changing even if i define it.
    2 replies
    @mhasanj If you are using the custom header, then it should be easy as instead of binding the command property of the close button, you can directly handle it using click event in code behind.
    Shreyasj96
    @Shreyasj96
    @angshuman-agarwal Thanks for the help.
    ZeZerT
    @ZeZerT

    Hi ! I would like to get helped on customizing dragablz:TabablzControl 's headers
    What i would like to change : Remove the borders, change the default background & foreground colors, when selected and when not selected.

    I have tried a lot of things but i can't get to where i want. The following example only seemed to modify the header's inner textbox without changing the overall header.

                <dragablz:TabablzControl.HeaderItemTemplate>
                    <DataTemplate>
                        <Grid Background="Red">
                            <TextBlock Text="Interface --"/>
                        </Grid>
                    </DataTemplate>
                </dragablz:TabablzControl.HeaderItemTemplate>
    image.png
    idealy my goal is this
    image.png
    ZeZerT
    @ZeZerT
    Can anyone guide me on this ? please :)
    Jérémy VIGNELLES
    @jeremyVignelles
    Maybe override the whole template and not just the HeaderItemTemplate ?
    It's been a while (2 years or so) since I last used this library to be honnest
    ZeZerT
    @ZeZerT
    I was hoping i wouldn't have to go this deep, mainly because i'm not sure how i should do it
    Jérémy VIGNELLES
    @jeremyVignelles
    start by looking at the source code
    understanding how it's implemented is the best way to understand how you could customize it
    ZeZerT
    @ZeZerT
    thanks, i'll start this way then
    the question is still open :)
    ZeZerT
    @ZeZerT
    since i'm running out of time i went for a dirty solution : negative margins
    <dragablz:TabablzControl.HeaderItemTemplate>
        <DataTemplate>
            <Grid Background="{StaticResource gray}" Margin="-7,-3,-6,-2" Width="90" >
                <TextBlock Text="Interface x" Foreground="White" HorizontalAlignment="Center" Margin="3"/>
            </Grid>
        </DataTemplate>
    </dragablz:TabablzControl.HeaderItemTemplate>
    image.png