mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
35 lines
939 B
C#
35 lines
939 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using Microsoft.CmdPal.UI.ViewModels.Models;
|
|
using Microsoft.CommandPalette.Extensions;
|
|
|
|
namespace Microsoft.CmdPal.UI.ViewModels;
|
|
|
|
public class GalleryGridPropertiesViewModel : IGridPropertiesViewModel
|
|
{
|
|
private readonly ExtensionObject<IGalleryGridLayout> _model;
|
|
|
|
public bool ShowTitle { get; private set; }
|
|
|
|
public bool ShowSubtitle { get; private set; }
|
|
|
|
public GalleryGridPropertiesViewModel(IGalleryGridLayout galleryGridLayout)
|
|
{
|
|
_model = new(galleryGridLayout);
|
|
}
|
|
|
|
public void InitializeProperties()
|
|
{
|
|
var model = _model.Unsafe;
|
|
if (model is null)
|
|
{
|
|
return; // throw?
|
|
}
|
|
|
|
ShowTitle = model.ShowTitle;
|
|
ShowSubtitle = model.ShowSubtitle;
|
|
}
|
|
}
|