mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-08 02:06:37 +08:00
misc: format code for consistency and readability.
This commit is contained in:
@@ -2,11 +2,10 @@ using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Semi.Avalonia.Demo.Views;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public partial class ApplicationViewModel: ObservableObject
|
||||
public partial class ApplicationViewModel : ObservableObject
|
||||
{
|
||||
[RelayCommand]
|
||||
private void Exit()
|
||||
|
||||
@@ -30,7 +30,7 @@ public partial class FilesPageViewModel : ObservableObject
|
||||
Source.Items = [Root];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
partial void OnSelectedPathChanged(string? value)
|
||||
{
|
||||
SetSelectedPath(value);
|
||||
|
||||
@@ -27,25 +27,25 @@ public class SongsPageViewModel : ObservableObject
|
||||
{
|
||||
new CheckBoxColumn<SongViewModel>(
|
||||
"IsSelected",
|
||||
a => a.IsSelected,
|
||||
a => a.IsSelected,
|
||||
(model, b) => { model.IsSelected = b; },
|
||||
new GridLength(108, GridUnitType.Pixel)),
|
||||
new TextColumn<SongViewModel, string>(
|
||||
"Title",
|
||||
a => a.Title,
|
||||
"Title",
|
||||
a => a.Title,
|
||||
(o, a) => o.Title = a,
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
new TextColumn<SongViewModel, string>("Artist",
|
||||
a => a.Artist,
|
||||
new TextColumn<SongViewModel, string>("Artist",
|
||||
a => a.Artist,
|
||||
(o, a) => o.Artist = a,
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
new TemplateColumn<SongViewModel>("Album",
|
||||
"AlbumCell",
|
||||
new TemplateColumn<SongViewModel>("Album",
|
||||
"AlbumCell",
|
||||
"AlbumEditCell",
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
new TemplateColumn<SongViewModel>(
|
||||
"Comments",
|
||||
"CommentsCell",
|
||||
"Comments",
|
||||
"CommentsCell",
|
||||
"CommentsEditCell",
|
||||
new GridLength(6, GridUnitType.Star)),
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Semi.Avalonia.Demo.ViewModels;
|
||||
|
||||
public class TreeDataGridDemoViewModel: ObservableObject
|
||||
public class TreeDataGridDemoViewModel : ObservableObject
|
||||
{
|
||||
public SongsPageViewModel SongsContext { get; } = new();
|
||||
public FilesPageViewModel FilesContext { get; } = new();
|
||||
|
||||
Reference in New Issue
Block a user