GithubHelp home page GithubHelp logo

Comments (6)

IvanJosipovic avatar IvanJosipovic commented on May 27, 2024 2

Hey,

I agree that this is a bug, as a workaround you can create a custom DocumentDock and override IsEmpty and set it to false.

using Avalonia;
using Dock.Model.Mvvm.Controls;

namespace App.ViewModels;

public class CustomDocumentDock : DocumentDock
{
    // Fixes bug where the view disappears when empty
    public new bool IsEmpty => false;
}

from dock.

BAndysc avatar BAndysc commented on May 27, 2024 2

That's why I love open source :) I couldn't find the root cause before, but after you posted your workaround, it become obvious that something is wrong with updating IsEmpty attached property. And I was able to make a fix: #322

from dock.

TobiArndt avatar TobiArndt commented on May 27, 2024 1

I wanted to start to fix this problem and started reading the code and getting all its logic, and you just did it. Was reading your changes in your pr. Quiet amazing and skillfull! Works like a charme!

from dock.

BradBergstrom avatar BradBergstrom commented on May 27, 2024

Cool! I was just coming here to ask this exact question!

from dock.

TobiArndt avatar TobiArndt commented on May 27, 2024

Your solution is working nicely!
But I have got another question, which seems kinda buggy in the case, when all documents have been closed.
What I really would like is that an empty FilesDocumentDock is not vanishing, when it has no children anymore, but that there is an option that it is staying there, just without any elements.

from dock.

BAndysc avatar BAndysc commented on May 27, 2024

@TobiArndt You are right, there was IsCollapsable property, but it wasn't respected. Changed the PR to take that into account and now the document dock shall not disappear provided you set IsCollapsable to false

Screen.Recording.2024-03-10.at.16.54.34.mov

from dock.

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.