47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
// This Source Code Form is subject to the terms of the MIT License.
|
|
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
|
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
|
// All Rights Reserved.
|
|
|
|
using WPFluent.Controls;
|
|
using WPFluent.Gallery.Models;
|
|
using WPFluent.Gallery.Services;
|
|
using WPFluent.Gallery.Views.Windows;
|
|
|
|
namespace WPFluent.Gallery.ViewModels.Pages.Windows;
|
|
|
|
public partial class WindowsViewModel(WindowsProviderService windowsProviderService) : ViewModel
|
|
{
|
|
[ObservableProperty]
|
|
private WindowCard[] _windowCards =
|
|
[
|
|
new("FluentWindow", "Light FluentWindow.", SymbolRegular.CodeBlock24, "FluentWindow"),
|
|
new("FluentWindowEx", "Light FluentWindowEx.", SymbolRegular.ScanText24, "FluentWindowEx"),
|
|
new("FluentWindowWithTitleBar", "FluentWindow With TitleBar.", SymbolRegular.ScanText24, "FluentWindowWithTitleBar"),
|
|
];
|
|
|
|
[RelayCommand]
|
|
public void OnOpenWindow(string value)
|
|
{
|
|
if (string.IsNullOrEmpty(value))
|
|
{
|
|
return;
|
|
}
|
|
|
|
switch (value)
|
|
{
|
|
case "FluentWindow":
|
|
windowsProviderService.Show<FluentWindowDemo>();
|
|
break;
|
|
|
|
// case "FluentWindowWithTitleBar":
|
|
// windowsProviderService.Show<EditorWindow>();
|
|
// break;
|
|
//
|
|
// case "sandbox":
|
|
// windowsProviderService.Show<SandboxWindow>();
|
|
// break;
|
|
}
|
|
}
|
|
}
|