Reputation: 3
Maybe some one can help me or tell me how to add an icon in the tab of a new document in "DockPanel Suite" ? Or what is the best way to do this ? Thank you in advance for your help and feedback. Regards, Daniel
(Another point. It will be nice to do that with VS2012 Light theme. Thank you in advance. Daniel)
Upvotes: 0
Views: 1466
Reputation: 63143
Set DockContent.Icon
to the icon you want (similar to set Icon
of a normal Form
).
Set DockPanel.ShowDocumentIcon
to true
.
If you look for a sample, this Compiler project uses this feature,
https://github.com/lextudio/sharpsnmplib/tree/51773488fcb7b9714a38134187363fef5762daca/Compiler
To get VS2012 theme, make sure that
You use our 3.0 NuGet package or build from development_3.0
branch, https://github.com/dockpanelsuite/dockpanelsuite/tree/development_3.0
Create a new instance of VS2012LightTheme
class and assign it to DockPanel.Theme
.
This has been demonstrated in DockSample project of DockPanel Suite,
https://github.com/dockpanelsuite/dockpanelsuite/blob/development_3.0/DockSample/MainForm.cs
You can see the changes needed in SetSchema
method.
Note that all existing DockContent
objects should be cleaned before changing themes.
Upvotes: 0