Comments (6)
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.
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.
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.
Cool! I was just coming here to ask this exact question!
from dock.
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.
@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)
- After upgrading to Dock 11.0.x, get error CSC : error AXN0002 HOT 6
- Window disappears after dragging and dropping HOT 3
- Dock marks don't show up. HOT 1
- UserControls inside Tool (and probably in every dockable) always null in code
- . HOT 1
- After close all documents when is created a new one it not update/show automatically HOT 1
- Restoring a layout which re-docks floating documents causes exceptions HOT 4
- Support AoT/Trimming HOT 4
- HostWindowTitleBar has a Foreground Brush not appropriate for Simple (Dark) theme. HOT 1
- [BUG] Binding does not work on Tool
- ProportionalDock is covering up the DocumentDock HOT 1
- Document.OnClose() should return Task<bool>
- Dock.Avalonia 11.0.0.5 NuGet on net8 gives error The type or namespace name 'Factory' could not be found
- Docking tracking disabling when tool window is outside screen HOT 2
- Community Support Schedule and Approach HOT 3
- Fonts change when floating a window HOT 1
- Dock floated tool window cant be docked HOT 8
- Where did the wiki go? HOT 1
- Nested Docks HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dock.