Giter Club home page Giter Club logo

Comments (14)

ButchersBoy avatar ButchersBoy commented on July 21, 2024

Yeah...this is one of the last big holes in the API...hopefully I will get to it soon.

from dragablz.

QuantumDeveloper avatar QuantumDeveloper commented on July 21, 2024

@ButchersBoy can you also take into consideration this when you will implement side panels (tool windows)? Possibility to control tab position from MVVM would be a greate feature

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

Will do, but as discussed previously, phased in. First thing we need is a method to be able to split the Layout in code on the fly. Then, when in used in conjunction with the existing TabablzControl.AddItem method you will be able to create everything you can currently do with the mouse in code. We already have the query API, so completing this would leave you fully able to save/restore the layout in user code.

So initially, lookout for some kind of Layout.Split method...I'll try and get to this in the next week or two.

from dragablz.

QuantumDeveloper avatar QuantumDeveloper commented on July 21, 2024

ok, looking forward to this.

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

You can now split the layout in code using the Layout.Branch method. Please run up the test app and play with this screen:

branchapi

Search for usages of Layout.Branch to see how to use it (documentation is scarce at the moment).

Couple of things:

  • ratio is included in the API, but not plugged in as of writing
  • when the windows get small, they suddenly expand in size when tearing out. I am aware of this issue.

from dragablz.

QuantumDeveloper avatar QuantumDeveloper commented on July 21, 2024

One more issue: when maximize window, it does not fit to the task bar (dont know is it already was reported)

And another regarding dragablz: Could you make that if I drop tab into center, it not tirn to mdi window by default, but just appears it the center like in VS? Just separate tab in it own container with width and height by default like all other tabs in your examples? Is it possible?

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

@QuantumDeveloper Set this value to False (or just remove):

<dockablz:Layout IsFloatDropZoneEnabled="False" />

This will remove the central zone for dropping into a tool window/MDI. There isn't one for dropping into the central tab zone as a) there is no central tab zone with this layout concept and b) individual branches can get too small.

Hopefully the reasoning for this will become more apparent over the next couple of updates; I've got a couple more things coming...

from dragablz.

QuantumDeveloper avatar QuantumDeveloper commented on July 21, 2024

@ButchersBoy aha, ok. Sorry. I thought that central drop zone is also mde for tabs.

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

Well kinda...the idea being that if you want, you can take a tab, and drop it straight into a tool window...so a kinda slightly different take on your VS type docking.

from dragablz.

QuantumDeveloper avatar QuantumDeveloper commented on July 21, 2024

Hm... ok, I understood. Will wait your further updates.

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

The Layout.Branch() method now accepts firstItemProportion so size of a branch can be set from code.

And you can get the current proportions of a split from Branch.GetFirstProportion()

This is a pretty big step, now Windows/tabs/branches can all be restored from code (Floating windows still to do), if you follow a sequence of steps to restore your layout. You can see this from this demo page:

image

from dragablz.

mistuhk avatar mistuhk commented on July 21, 2024

Hi thank you for this awesome library. An issue i can't seem to resolve is how to set the position of the floating item. By default it is positioned to the top left of my app window. Is it possible to change this default?

Thank you

from dragablz.

ButchersBoy avatar ButchersBoy commented on July 21, 2024

@simplykayy there are still some parts of the API to finalise around the floating items; the big one being able to manage where the initially appear...so work on that is pending.

from dragablz.

mistuhk avatar mistuhk commented on July 21, 2024

Thank you for your prompt feedback. Another question, the TabablzControl ClosingItemCallback routed event, does that work with blend sdk interactive triggers?

I have gone down the route of MVVM and was thinking i'd hook that event into the blend sdk interaction event but it doesn't seem to work....any guidance. Below is a sample code =>

&lt;dragablz:TabablzControl ShowDefaultCloseButton="True" ItemsSource="{Binding TabContents}" 
                         AdjacentHeaderItemOffset="1" Margin="0 5 5 5" IsEnabled="True"
                         Visibility="{Binding ShowDeviceInteraction, Converter={StaticResource BooleanToVisibilityConverter}}"&gt;
    &lt;i:Interaction.Triggers&gt;
        &lt;i:EventTrigger EventName="ClosingItemCallback"&gt;
            &lt;i:InvokeCommandAction Command="{Binding OnTabClosedCommand}" /&gt;
        &lt;/i:EventTrigger&gt;
    &lt;/i:Interaction.Triggers&gt;
    &lt;TabControl.ContentTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;ContentPresenter Content="{Binding Content}" /&gt;
        &lt;/DataTemplate&gt;
    &lt;/TabControl.ContentTemplate&gt;
&lt;/dragablz:TabablzControl&gt;

from dragablz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.