csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.7 KiB
96 lines
2.7 KiB
using System;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Media;
|
|
using Avalonia.Styling;
|
|
using ControlCatalog.Models;
|
|
using MiniMvvm;
|
|
|
|
namespace ControlCatalog.ViewModels
|
|
{
|
|
public class SettingsViewModel : ViewModelBase
|
|
{
|
|
public SettingsViewModel()
|
|
{
|
|
WindowStates = new WindowState[]
|
|
{
|
|
WindowState.Minimized,
|
|
WindowState.Normal,
|
|
WindowState.Maximized,
|
|
WindowState.FullScreen,
|
|
};
|
|
|
|
WindowState = WindowState.Normal;
|
|
|
|
WindowDecorationsOptions = [.. Enum.GetValues<WindowDecorations>()];
|
|
|
|
CurrentWindowDecorations = WindowDecorations.Full;
|
|
|
|
CatalogThemes = [.. Enum.GetValues<CatalogTheme>()];
|
|
|
|
WindowTransparencyLevels = new[]{
|
|
WindowTransparencyLevel.None,
|
|
WindowTransparencyLevel.Transparent,
|
|
WindowTransparencyLevel.Blur,
|
|
WindowTransparencyLevel.AcrylicBlur,
|
|
WindowTransparencyLevel.Mica
|
|
};
|
|
|
|
CurrentWindowTransparencyLevel = WindowTransparencyLevel.None;
|
|
|
|
FlowDirections = [.. Enum.GetValues<FlowDirection>()];
|
|
|
|
CurrentFlowDirection = FlowDirection.LeftToRight;
|
|
|
|
ThemeVariants = new[]
|
|
{
|
|
ThemeVariant.Default,
|
|
ThemeVariant.Light,
|
|
ThemeVariant.Dark
|
|
};
|
|
|
|
CurrentThemeVariant = ThemeVariant.Default;
|
|
}
|
|
|
|
public WindowState WindowState
|
|
{
|
|
get;
|
|
set => RaiseAndSetIfChanged(ref field, value);
|
|
}
|
|
|
|
public FlowDirection CurrentFlowDirection
|
|
{
|
|
get;
|
|
set => RaiseAndSetIfChanged(ref field, value);
|
|
}
|
|
public ThemeVariant[] ThemeVariants { get; }
|
|
public WindowDecorations CurrentWindowDecorations
|
|
{
|
|
get;
|
|
set => RaiseAndSetIfChanged(ref field, value);
|
|
}
|
|
|
|
public CatalogTheme CurrentCatalogTheme
|
|
{
|
|
get;
|
|
set => RaiseAndSetIfChanged(ref field, value);
|
|
}
|
|
|
|
public WindowTransparencyLevel CurrentWindowTransparencyLevel
|
|
{
|
|
get;
|
|
set => RaiseAndSetIfChanged(ref field, value);
|
|
}
|
|
|
|
public ThemeVariant CurrentThemeVariant
|
|
{
|
|
get;
|
|
set => RaiseAndSetIfChanged(ref field, value);
|
|
}
|
|
|
|
public FlowDirection[] FlowDirections { get; }
|
|
public WindowTransparencyLevel[] WindowTransparencyLevels { get; }
|
|
public WindowDecorations[] WindowDecorationsOptions { get; }
|
|
public WindowState[] WindowStates { get; }
|
|
public CatalogTheme[] CatalogThemes { get; }
|
|
}
|
|
}
|
|
|