Index: Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml =================================================================== diff -u -rd6b7ed144b128f034c3a8d18671e42aae9eacc3e -r9e3aff6b1c4dce35cb383fd84b9dd89fae6e4c07 --- Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml (.../AvalonDockViewHost.xaml) (revision d6b7ed144b128f034c3a8d18671e42aae9eacc3e) +++ Core/Gui/src/Core.Gui/Forms/ViewHost/AvalonDockViewHost.xaml (.../AvalonDockViewHost.xaml) (revision 9e3aff6b1c4dce35cb383fd84b9dd89fae6e4c07) @@ -28,8 +28,7 @@ xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" xmlns:viewHost="clr-namespace:Core.Gui.Forms.ViewHost" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" - d:DataContext="{d:DesignInstance IsDesignTimeCreatable=False, Type={x:Type viewHost:CustomLayoutAnchorable}}"> + d:DesignHeight="300" d:DesignWidth="300"> @@ -46,14 +45,24 @@ - + + + + + + + . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Windows; +using System.Windows.Media; +using Xceed.Wpf.AvalonDock.Layout; + +namespace Core.Gui.Forms.ViewHost +{ + /// + /// Custom implementation of . + /// + public class CustomLayoutDocument : LayoutDocument + { + /// + /// The symbol . + /// + public static readonly DependencyProperty SymbolProperty = DependencyProperty.Register( + "Symbol", typeof(string), typeof(CustomLayoutDocument), new PropertyMetadata(default(string))); + + /// + /// The font family . + /// + public static readonly DependencyProperty FontFamilyProperty = DependencyProperty.Register( + "FontFamily", typeof(FontFamily), typeof(CustomLayoutDocument), new PropertyMetadata(default(FontFamily))); + + /// + /// Gets or sets the symbol. + /// + public string Symbol + { + get => (string) GetValue(SymbolProperty); + set => SetValue(SymbolProperty, value); + } + + /// + /// Gets or sets the font family of the symbol. + /// + public FontFamily FontFamily + { + get => (FontFamily) GetValue(FontFamilyProperty); + set => SetValue(FontFamilyProperty, value); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/Forms/ViewHost/CustomLayoutDocumentTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/Forms/ViewHost/CustomLayoutDocumentTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/Forms/ViewHost/CustomLayoutDocumentTest.cs (revision 9e3aff6b1c4dce35cb383fd84b9dd89fae6e4c07) @@ -0,0 +1,52 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Windows.Media; +using Core.Gui.Forms.ViewHost; +using NUnit.Framework; +using Xceed.Wpf.AvalonDock.Layout; + +namespace Core.Gui.Test.Forms.ViewHost +{ + [TestFixture] + public class CustomLayoutDocumentTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Setup + const string symbol = "123"; + var fontFamily = new FontFamily(); + + // Call + var layoutDocument = new CustomLayoutDocument + { + Symbol = symbol, + FontFamily = fontFamily + }; + + // Assert + Assert.IsInstanceOf(layoutDocument); + Assert.AreEqual(symbol, layoutDocument.Symbol); + Assert.AreSame(fontFamily, layoutDocument.FontFamily); + } + } +} \ No newline at end of file