/ src / modules / cmdpal / Core / Microsoft.CmdPal.Core.ViewModels / MediumGridPropertiesViewModel.cs
MediumGridPropertiesViewModel.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using Microsoft.CmdPal.Core.ViewModels.Models; 6 using Microsoft.CommandPalette.Extensions; 7 8 namespace Microsoft.CmdPal.Core.ViewModels; 9 10 public class MediumGridPropertiesViewModel : IGridPropertiesViewModel 11 { 12 private readonly ExtensionObject<IMediumGridLayout> _model; 13 14 public bool ShowTitle { get; private set; } 15 16 public bool ShowSubtitle => false; 17 18 public MediumGridPropertiesViewModel(IMediumGridLayout mediumGridLayout) 19 { 20 _model = new(mediumGridLayout); 21 } 22 23 public void InitializeProperties() 24 { 25 var model = _model.Unsafe; 26 if (model is null) 27 { 28 return; // throw? 29 } 30 31 ShowTitle = model.ShowTitle; 32 } 33 }