// // MainWindowViewModel.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.ObjectModel; using System.ComponentModel; using Dock.Model.Controls; using Dock.Model.Core; using PacketLogger.Models; using PacketLogger.Models.Packets; namespace PacketLogger.ViewModels; /// public class MainWindowViewModel : ViewModelBase, INotifyPropertyChanged { private readonly IFactory? _factory; /// /// Initializes a new instance of the class. /// public MainWindowViewModel() { _factory = new DockFactory(this); Layout = _factory?.CreateLayout(); if (Layout is { }) { _factory?.InitLayout(Layout); if (Layout is { } root) { root.Navigate.Execute("Home"); } } } /// /// Gets or sets the layout. /// public IRootDock? Layout { get; set; } }