lqjun
lqjun

Reputation: 19

How to set dock tabs pinned in Avalonia when app starts?

I am a beginner in using Avalonia.I am using Dock UI in my Avalonia Application,I want to make some dock taps autohide(pinned?) at initial startup,I just don't know how to make it works?

I have tried set IsExpanded = false on ToolDock, it didn't work.

Upvotes: 1

Views: 128

Answers (1)

lqjun
lqjun

Reputation: 19

After reading the source code of Dock, I finally solved the problem by calling IFactory.PinDockable() method. For example:

this.toolDock.Factory?.PinDockable(this.tool);

Upvotes: 0

Related Questions