feat: clean up warnings.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Data.Core;
|
||||
using Avalonia.Data.Core.Plugins;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Sandbox.ViewModels;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.iOS;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Ursa.Demo.iOS;
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.Shapes;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Metadata;
|
||||
@@ -25,7 +23,7 @@ public class IconNameConverter: IValueConverter
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
|
||||
@@ -9,7 +8,7 @@ namespace Ursa.Demo.Converters;
|
||||
|
||||
public class IconNameToPathConverter: IValueConverter
|
||||
{
|
||||
private string[] paths = new[]
|
||||
private readonly string[] _paths = new[]
|
||||
{
|
||||
"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z",
|
||||
"M16 12L9 2L2 12H3.86L0 18H7V22H11V18H18L14.14 12H16M20.14 12H22L15 2L12.61 5.41L17.92 13H15.97L19.19 18H24L20.14 12M13 19H17V22H13V19Z",
|
||||
@@ -19,23 +18,23 @@ public class IconNameToPathConverter: IValueConverter
|
||||
"M16.67,4H15V2H9V4H7.33A1.33,1.33 0 0,0 6,5.33V20.67C6,21.4 6.6,22 7.33,22H16.67A1.33,1.33 0 0,0 18,20.67V5.33C18,4.6 17.4,4 16.67,4Z",
|
||||
"M12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22C17.5 22 22 17.5 22 12S17.5 2 12 2M12.5 13H11V7H12.5V11.3L16.2 9.2L17 10.5L12.5 13Z"
|
||||
};
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int i)
|
||||
{
|
||||
string s = paths[i % paths.Length];
|
||||
var s = _paths[i % _paths.Length];
|
||||
return StreamGeometry.Parse(s);
|
||||
}
|
||||
else if (value is string s)
|
||||
{
|
||||
int hash = s.GetHashCode();
|
||||
string path = paths[Math.Abs(hash) % paths.Length];
|
||||
var hash = s.GetHashCode();
|
||||
var path = _paths[Math.Abs(hash) % _paths.Length];
|
||||
return StreamGeometry.Parse(path);
|
||||
}
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using Ursa.Controls;
|
||||
@@ -10,7 +9,7 @@ namespace Ursa.Demo.Converters;
|
||||
|
||||
public class TimelineIconConverter: IValueConverter
|
||||
{
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is TimelineItemType t)
|
||||
{
|
||||
@@ -25,7 +24,7 @@ public class TimelineIconConverter: IValueConverter
|
||||
return AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ public class ToolBarItemTemplateSelector: IDataTemplate
|
||||
public Control? Build(object? param)
|
||||
{
|
||||
if (param is null) return null;
|
||||
if (param is ToolBarSeparatorViewModel sep)
|
||||
if (param is ToolBarSeparatorViewModel)
|
||||
{
|
||||
return new ToolBarSeparator();
|
||||
}
|
||||
if (param is ToolBarButtonItemViewModel vm)
|
||||
if (param is ToolBarButtonItemViewModel)
|
||||
{
|
||||
return new Button()
|
||||
{
|
||||
@@ -27,7 +27,7 @@ public class ToolBarItemTemplateSelector: IDataTemplate
|
||||
[!ToolBar.OverflowModeProperty] = new Binding(){Path = nameof(ToolBarItemViewModel.OverflowMode)},
|
||||
};
|
||||
}
|
||||
if (param is ToolBarCheckBoxItemViweModel cb)
|
||||
if (param is ToolBarCheckBoxItemViweModel)
|
||||
{
|
||||
return new CheckBox()
|
||||
{
|
||||
@@ -36,7 +36,7 @@ public class ToolBarItemTemplateSelector: IDataTemplate
|
||||
[!ToolBar.OverflowModeProperty] = new Binding(){Path = nameof(ToolBarItemViewModel.OverflowMode)},
|
||||
};
|
||||
}
|
||||
if (param is ToolBarComboBoxItemViewModel combo)
|
||||
if (param is ToolBarComboBoxItemViewModel)
|
||||
{
|
||||
return new ComboBox()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Templates;
|
||||
using Ursa.Demo.Pages;
|
||||
|
||||
namespace Ursa.Demo.Converters;
|
||||
|
||||
@@ -10,16 +9,13 @@ public class ViewLocator: IDataTemplate
|
||||
public Control? Build(object? param)
|
||||
{
|
||||
if (param is null) return null;
|
||||
var name = param.GetType().Name!.Replace("ViewModel", "");
|
||||
var name = param.GetType().Name.Replace("ViewModel", "");
|
||||
var type = Type.GetType("Ursa.Demo.Pages."+name);
|
||||
if (type != null)
|
||||
{
|
||||
return (Control)Activator.CreateInstance(type)!;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new TextBlock { Text = "Not Found: " + name };
|
||||
}
|
||||
return new TextBlock { Text = "Not Found: " + name };
|
||||
}
|
||||
|
||||
public bool Match(object? data)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Dialogs;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Dialogs;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Notifications;
|
||||
using Avalonia.Markup.Xaml;
|
||||
@@ -23,9 +22,9 @@ public partial class BannerDemo : UserControl
|
||||
|
||||
public class BannerDemoViewModel : ViewModelBase
|
||||
{
|
||||
private ObservableCollection<NotificationType> _types;
|
||||
private ObservableCollection<NotificationType>? _types;
|
||||
|
||||
public ObservableCollection<NotificationType> Types
|
||||
public ObservableCollection<NotificationType>? Types
|
||||
{
|
||||
get => _types;
|
||||
set => SetProperty(ref _types, value);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
@@ -10,6 +8,6 @@ public partial class ButtonGroupDemo : UserControl
|
||||
public ButtonGroupDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new ButtonGroupDemoViewModel();
|
||||
DataContext = new ButtonGroupDemoViewModel();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
@@ -13,12 +11,12 @@ public partial class DatePickerDemo : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CalendarView_OnOnDateSelected(object? sender, CalendarDayButtonEventArgs e)
|
||||
private void CalendarView_OnOnDateSelected(object? _, CalendarDayButtonEventArgs e)
|
||||
{
|
||||
Debug.WriteLine("Pressed: "+ e.Date?.ToLongDateString());
|
||||
}
|
||||
|
||||
private void CalendarView_OnOnDatePreviewed(object? sender, CalendarDayButtonEventArgs e)
|
||||
private void CalendarView_OnOnDatePreviewed(object? _, CalendarDayButtonEventArgs e)
|
||||
{
|
||||
Debug.WriteLine("Hovered: "+e.Date?.ToLongDateString());
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
x:Class="Ursa.Demo.Pages.DrawerDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:common="clr-namespace:Ursa.Common;assembly=Ursa"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
x:Class="Ursa.Demo.Pages.IntroductionDemo"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:Ursa.Demo.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
@@ -10,9 +8,4 @@ public partial class KeyGestureInputDemo : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Shapes;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
@@ -13,15 +8,6 @@ public partial class NavMenuDemo : UserControl
|
||||
public NavMenuDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new NavMenuDemoViewModel();
|
||||
}
|
||||
|
||||
private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
if (sender is Rectangle c)
|
||||
{
|
||||
c.ApplyStyling();
|
||||
var ancestors = c.GetLogicalAncestors();
|
||||
}
|
||||
DataContext = new NavMenuDemoViewModel();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Left">
|
||||
<StackPanel Grid.Row="1">
|
||||
<StackPanel>
|
||||
<u:Divider Content="{Binding #input.Value, StringFormat='Int = {0}'}" />
|
||||
<u:NumericIntUpDown
|
||||
Name="input"
|
||||
@@ -148,9 +148,9 @@
|
||||
<CheckBox Content="IsReadOnly" IsChecked="{Binding IsReadOnly}" />
|
||||
|
||||
<Label Content="HorizontalAlignment" />
|
||||
<ComboBox ItemsSource="{Binding Array_HorizontalAlignment}" SelectedItem="{Binding HorizontalAlignment}" />
|
||||
<ComboBox ItemsSource="{Binding ArrayHorizontalAlignment}" SelectedItem="{Binding HorizontalAlignment}" />
|
||||
<Label Content="HorizontalContentAlignment" />
|
||||
<ComboBox ItemsSource="{Binding Array_HorizontalContentAlignment}" SelectedItem="{Binding HorizontalContentAlignment}" />
|
||||
<ComboBox ItemsSource="{Binding ArrayHorizontalContentAlignment}" SelectedItem="{Binding HorizontalContentAlignment}" />
|
||||
|
||||
<TextBox
|
||||
InnerLeftContent="InnerLeftContent"
|
||||
@@ -166,7 +166,7 @@
|
||||
Text="{Binding FormatString}" />
|
||||
|
||||
<Label Content="ParsingNumberStyle" />
|
||||
<ComboBox ItemsSource="{Binding Array_ParsingNumberStyle}" SelectedItem="{Binding ParsingNumberStyle}" />
|
||||
<ComboBox ItemsSource="{Binding ArrayParsingNumberStyle}" SelectedItem="{Binding ParsingNumberStyle}" />
|
||||
|
||||
<CheckBox Content="AllowSpin" IsChecked="{Binding AllowSpin}" />
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using System.Diagnostics;
|
||||
using Ursa.Controls;
|
||||
using Ursa.Demo.ViewModels;
|
||||
@@ -19,7 +16,9 @@ public partial class NumericUpDownDemo : UserControl
|
||||
|
||||
private void Numd_ValueChanged(object? sender, ValueChangedEventArgs<uint> e)
|
||||
{
|
||||
Trace.WriteLine($"{(sender as NumericUIntUpDown).Name} {e.OldValue} {e.NewValue}");
|
||||
|
||||
if (sender is NumericIntUpDown i)
|
||||
{
|
||||
Trace.WriteLine($"{i.Name} {e.OldValue} {e.NewValue}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Ursa.Demo.ViewModels;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:u="https://irihi.tech/ursa"
|
||||
xmlns:vm="using:Ursa.Demo.ViewModels"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
x:DataType="vm:VerificationCodeDemoViewModel"
|
||||
x:CompileBindings="True"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
using Ursa.Controls;
|
||||
|
||||
namespace Ursa.Demo.Pages;
|
||||
@@ -13,7 +10,7 @@ public partial class VerificationCodeDemo : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void VerificationCode_OnComplete(object? sender, VerificationCodeCompleteEventArgs e)
|
||||
private async void VerificationCode_OnComplete(object? _, VerificationCodeCompleteEventArgs e)
|
||||
{
|
||||
var text = string.Join(string.Empty, e.Code);
|
||||
await MessageBox.ShowOverlayAsync(text);
|
||||
|
||||
@@ -8,34 +8,29 @@ namespace Ursa.Demo.ViewModels;
|
||||
|
||||
public class BreadcrumbDemoViewModel: ObservableObject
|
||||
{
|
||||
public ObservableCollection<BreadcrumbDemoItem> Items1 { get; set; }
|
||||
|
||||
public BreadcrumbDemoViewModel()
|
||||
{
|
||||
Items1 = new ObservableCollection<BreadcrumbDemoItem>()
|
||||
{
|
||||
new BreadcrumbDemoItem() { Section = "Home", Icon = "Home" },
|
||||
new BreadcrumbDemoItem() { Section = "Page 1", Icon = "Page" },
|
||||
new BreadcrumbDemoItem() { Section = "Page 2", Icon = "Page" },
|
||||
new BreadcrumbDemoItem() { Section = "Page 3", Icon = "Page" },
|
||||
new BreadcrumbDemoItem() { Section = "Page 4", Icon = "Page", IsReadOnly = true},
|
||||
};
|
||||
}
|
||||
public ObservableCollection<BreadcrumbDemoItem> Items1 { get; set; } =
|
||||
[
|
||||
new BreadcrumbDemoItem { Section = "Home", Icon = "Home" },
|
||||
new BreadcrumbDemoItem { Section = "Page 1", Icon = "Page" },
|
||||
new BreadcrumbDemoItem { Section = "Page 2", Icon = "Page" },
|
||||
new BreadcrumbDemoItem { Section = "Page 3", Icon = "Page" },
|
||||
new BreadcrumbDemoItem { Section = "Page 4", Icon = "Page", IsReadOnly = true }
|
||||
];
|
||||
}
|
||||
|
||||
public partial class BreadcrumbDemoItem: ObservableObject
|
||||
{
|
||||
public string Section { get; set; }
|
||||
public string Icon { get; set; }
|
||||
public string? Section { get; set; }
|
||||
public string? Icon { get; set; }
|
||||
[ObservableProperty] private bool _isReadOnly;
|
||||
|
||||
public ICommand Command { get; set; }
|
||||
|
||||
public BreadcrumbDemoItem()
|
||||
{
|
||||
Command = new RelayCommand(() =>
|
||||
Command = new AsyncRelayCommand(async () =>
|
||||
{
|
||||
MessageBox.ShowOverlayAsync(Section);
|
||||
await MessageBox.ShowOverlayAsync(Section ?? string.Empty);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,8 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Ursa.Common;
|
||||
using Ursa.Controls;
|
||||
using Ursa.Demo.Dialogs;
|
||||
using Ursa.Demo.Pages;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data;
|
||||
@@ -9,7 +8,6 @@ using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public partial class FormDemoViewModel : ObservableObject
|
||||
|
||||
public partial class DataModel : ObservableObject
|
||||
{
|
||||
private string _name;
|
||||
private string _name = string.Empty;
|
||||
|
||||
[MinLength(10)]
|
||||
public string Name
|
||||
@@ -55,7 +55,7 @@ public partial class DataModel : ObservableObject
|
||||
set => SetProperty(ref _number, value);
|
||||
}
|
||||
|
||||
private string _email;
|
||||
private string _email = string.Empty;
|
||||
|
||||
[EmailAddress]
|
||||
public string Email
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using System;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
@@ -67,6 +68,7 @@ public class MainViewViewModel : ViewModelBase
|
||||
MenuKeys.MenuKeyToolBar => new ToolBarDemoViewModel(),
|
||||
MenuKeys.MenuKeyTimeBox => new TimeBoxDemoViewModel(),
|
||||
MenuKeys.MenuKeyVerificationCode => new VerificationCodeDemoViewModel(),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(s), s, null)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,10 @@ public enum ControlStatus
|
||||
|
||||
public class MenuItemViewModel: ViewModelBase
|
||||
{
|
||||
public string MenuHeader { get; set; }
|
||||
public string MenuIconName { get; set; }
|
||||
public string Key { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string? MenuHeader { get; set; }
|
||||
public string? MenuIconName { get; set; }
|
||||
public string? Key { get; set; }
|
||||
public string? Status { get; set; }
|
||||
|
||||
public bool IsSeparator { get; set; }
|
||||
public ObservableCollection<MenuItemViewModel> Children { get; set; } = new();
|
||||
@@ -31,7 +31,7 @@ public class MenuItemViewModel: ViewModelBase
|
||||
|
||||
private void OnActivate()
|
||||
{
|
||||
if (IsSeparator) return;
|
||||
WeakReferenceMessenger.Default.Send<string>(Key);
|
||||
if (IsSeparator || Key is null) return;
|
||||
WeakReferenceMessenger.Default.Send(Key);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public class MessageBoxDemoViewModel: ObservableObject
|
||||
|
||||
private readonly string _shortMessage = "Welcome to Ursa Avalonia!";
|
||||
private string _message;
|
||||
private string _title;
|
||||
private string? _title;
|
||||
|
||||
public ICommand DefaultMessageBoxCommand { get; set; }
|
||||
public ICommand OkCommand { get; set; }
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Layout;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Ursa.Controls;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
@@ -14,39 +11,36 @@ public partial class NumericUpDownDemoViewModel : ObservableObject
|
||||
|
||||
|
||||
private double _oldWidth = 300;
|
||||
[ObservableProperty] private bool _AutoWidth = true;
|
||||
[ObservableProperty] private double _Width = Double.NaN;
|
||||
[ObservableProperty] private uint _Value;
|
||||
[ObservableProperty] private string _FontFamily = "Consolas";
|
||||
[ObservableProperty] private bool _AllowDrag = false;
|
||||
[ObservableProperty] private bool _IsReadOnly = false;
|
||||
[ObservableProperty] private bool _autoWidth = true;
|
||||
[ObservableProperty] private double _width = double.NaN;
|
||||
[ObservableProperty] private uint _value;
|
||||
[ObservableProperty] private string _fontFamily = "Consolas";
|
||||
[ObservableProperty] private bool _allowDrag;
|
||||
[ObservableProperty] private bool _isReadOnly;
|
||||
|
||||
[ObservableProperty] private Array _Array_HorizontalAlignment;
|
||||
[ObservableProperty] private HorizontalAlignment _HorizontalAlignment = HorizontalAlignment.Center;
|
||||
[ObservableProperty] private Array _arrayHorizontalAlignment;
|
||||
[ObservableProperty] private HorizontalAlignment _horizontalAlignment = HorizontalAlignment.Center;
|
||||
|
||||
[ObservableProperty] private Array _Array_HorizontalContentAlignment;
|
||||
[ObservableProperty] private HorizontalAlignment _HorizontalContentAlignment = HorizontalAlignment.Center;
|
||||
[ObservableProperty] private object? _InnerLeftContent = "obj:0x";
|
||||
[ObservableProperty] private string _Watermark = "Water mark showed";
|
||||
[ObservableProperty] private string _FormatString = "X8";
|
||||
[ObservableProperty] private Array _Array_ParsingNumberStyle;
|
||||
[ObservableProperty] private NumberStyles _ParsingNumberStyle = NumberStyles.AllowHexSpecifier;
|
||||
[ObservableProperty] private bool _AllowSpin = true;
|
||||
[ObservableProperty] private bool _ShowButtonSpinner = true;
|
||||
[ObservableProperty] private Array _arrayHorizontalContentAlignment;
|
||||
[ObservableProperty] private HorizontalAlignment _horizontalContentAlignment = HorizontalAlignment.Center;
|
||||
[ObservableProperty] private object? _innerLeftContent = "obj:0x";
|
||||
[ObservableProperty] private string _watermark = "Water mark showed";
|
||||
[ObservableProperty] private string _formatString = "X8";
|
||||
[ObservableProperty] private Array _arrayParsingNumberStyle;
|
||||
[ObservableProperty] private NumberStyles _parsingNumberStyle = NumberStyles.AllowHexSpecifier;
|
||||
[ObservableProperty] private bool _allowSpin = true;
|
||||
[ObservableProperty] private bool _showButtonSpinner = true;
|
||||
|
||||
[ObservableProperty] private UInt32 _Maximum = UInt32.MaxValue;
|
||||
[ObservableProperty] private UInt32 _Minimum = UInt32.MinValue;
|
||||
[ObservableProperty] private UInt32 _Step = 1;
|
||||
[ObservableProperty] private UInt32 _maximum = UInt32.MaxValue;
|
||||
[ObservableProperty] private UInt32 _minimum = UInt32.MinValue;
|
||||
[ObservableProperty] private UInt32 _step = 1;
|
||||
|
||||
[ObservableProperty] private bool _IsEnable = true;
|
||||
[ObservableProperty] private bool _isEnable = true;
|
||||
|
||||
[ObservableProperty] private string _CommandUpdateText = "Command not Execute";
|
||||
|
||||
uint v = 0;
|
||||
[ObservableProperty] private string _commandUpdateText = "Command not Execute";
|
||||
|
||||
[RelayCommand]
|
||||
// void Trythis()
|
||||
void Trythis(uint v)
|
||||
// void Trythis(object v)
|
||||
{
|
||||
CommandUpdateText = $"Command Exe,CommandParameter={v}";
|
||||
}
|
||||
@@ -54,12 +48,9 @@ public partial class NumericUpDownDemoViewModel : ObservableObject
|
||||
|
||||
public NumericUpDownDemoViewModel()
|
||||
{
|
||||
Array_HorizontalContentAlignment = Enum.GetValues(typeof(HorizontalAlignment));
|
||||
Array_HorizontalAlignment = Enum.GetValues(typeof(HorizontalAlignment));
|
||||
Array_ParsingNumberStyle = Enum.GetValues(typeof(NumberStyles));
|
||||
NumericUIntUpDown numericUIntUpDown;
|
||||
TextBox textBox;
|
||||
|
||||
ArrayHorizontalContentAlignment = Enum.GetValues(typeof(HorizontalAlignment));
|
||||
ArrayHorizontalAlignment = Enum.GetValues(typeof(HorizontalAlignment));
|
||||
ArrayParsingNumberStyle = Enum.GetValues(typeof(NumberStyles));
|
||||
}
|
||||
|
||||
partial void OnAutoWidthChanged(bool value)
|
||||
@@ -74,10 +65,4 @@ public partial class NumericUpDownDemoViewModel : ObservableObject
|
||||
Width = _oldWidth;
|
||||
}
|
||||
}
|
||||
|
||||
partial void OnValueChanging(uint oldValue, uint newValue)
|
||||
{
|
||||
// Console.WriteLine(oldValue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Collections;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
namespace Ursa.Demo.ViewModels;
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ursa.Demo.ViewModels
|
||||
namespace Ursa.Demo.ViewModels
|
||||
{
|
||||
public class SkeletonDemoViewModel : ViewModelBase
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
|
||||
@@ -23,21 +23,21 @@ public partial class ToolBarDemoViewModel : ObservableObject
|
||||
{
|
||||
Items = new()
|
||||
{
|
||||
new ToolBarButtonItemViewModel() { Content = "New", OverflowMode = OverflowMode.AsNeeded },
|
||||
new ToolBarButtonItemViewModel() { Content = "Open" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save1" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save2" },
|
||||
new ToolBarButtonItemViewModel { Content = "New", OverflowMode = OverflowMode.AsNeeded },
|
||||
new ToolBarButtonItemViewModel { Content = "Open" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save1" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save2" },
|
||||
new ToolBarSeparatorViewModel(),
|
||||
new ToolBarButtonItemViewModel() { Content = "Save3" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save4" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save5" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save6" },
|
||||
new ToolBarButtonItemViewModel() { Content = "Save7" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save3" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save4" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save5" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save6" },
|
||||
new ToolBarButtonItemViewModel { Content = "Save7" },
|
||||
new ToolBarSeparatorViewModel(),
|
||||
new ToolBarButtonItemViewModel() { Content = "Save8" },
|
||||
new ToolBarCheckBoxItemViweModel() { Content = "Bold" },
|
||||
new ToolBarCheckBoxItemViweModel() { Content = "Italic", OverflowMode = OverflowMode.Never },
|
||||
new ToolBarComboBoxItemViewModel() { Content = "Font Size", Items = new() { "10", "12", "14" } }
|
||||
new ToolBarButtonItemViewModel { Content = "Save8" },
|
||||
new ToolBarCheckBoxItemViweModel { Content = "Bold" },
|
||||
new ToolBarCheckBoxItemViweModel { Content = "Italic", OverflowMode = OverflowMode.Never },
|
||||
new ToolBarComboBoxItemViewModel { Content = "Font Size", Items = ["10", "12", "14"] }
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -49,41 +49,40 @@ public abstract class ToolBarItemViewModel : ObservableObject
|
||||
|
||||
public class ToolBarButtonItemViewModel : ToolBarItemViewModel
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public ICommand Command { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public ICommand? Command { get; set; }
|
||||
|
||||
public ToolBarButtonItemViewModel()
|
||||
{
|
||||
Command = new AsyncRelayCommand(async () => { await MessageBox.ShowOverlayAsync(Content); });
|
||||
Command = new AsyncRelayCommand(async () => { await MessageBox.ShowOverlayAsync(Content ?? string.Empty); });
|
||||
}
|
||||
}
|
||||
|
||||
public class ToolBarCheckBoxItemViweModel : ToolBarItemViewModel
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public bool IsChecked { get; set; }
|
||||
public ICommand Command { get; set; }
|
||||
public ICommand? Command { get; set; }
|
||||
|
||||
public ToolBarCheckBoxItemViweModel()
|
||||
{
|
||||
Command = new AsyncRelayCommand(async () => { await MessageBox.ShowOverlayAsync(Content); });
|
||||
Command = new AsyncRelayCommand(async () => { await MessageBox.ShowOverlayAsync(Content ?? string.Empty); });
|
||||
}
|
||||
}
|
||||
|
||||
public class ToolBarComboBoxItemViewModel : ToolBarItemViewModel
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public ObservableCollection<string> Items { get; set; }
|
||||
public string? Content { get; set; }
|
||||
public ObservableCollection<string>? Items { get; set; }
|
||||
|
||||
private string _selectedItem;
|
||||
|
||||
public string SelectedItem
|
||||
private string? _selectedItem;
|
||||
public string? SelectedItem
|
||||
{
|
||||
get => _selectedItem;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _selectedItem, value);
|
||||
MessageBox.ShowOverlayAsync(value);
|
||||
_ = MessageBox.ShowOverlayAsync(value ?? string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Avalonia.Collections;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Ursa.Controls;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Styling;
|
||||
|
||||
namespace Ursa.Demo.Views;
|
||||
|
||||
@@ -11,14 +8,4 @@ public partial class MainView : UserControl
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ToggleButton_OnIsCheckedChanged(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
var app = Application.Current;
|
||||
if (app is not null)
|
||||
{
|
||||
var theme = app.ActualThemeVariant;
|
||||
app.RequestedThemeVariant = theme == ThemeVariant.Dark ? ThemeVariant.Light : ThemeVariant.Dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,3 @@
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Ursa.Controls;
|
||||
|
||||
namespace Ursa.Demo.Views;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Ursa.Demo.Views;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Prism.DryIoc;
|
||||
using Prism.Ioc;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.PrismDialogDemo;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using DryIoc;
|
||||
using Ursa.Controls;
|
||||
using Ursa.Controls.Options;
|
||||
using Ursa.PrismExtension;
|
||||
@@ -22,6 +21,7 @@ public partial class MainWindow : Window
|
||||
_drawerService = drawerService;
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedParameter.Local
|
||||
private void OverlayDialogButton_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_overlayDialogService.ShowModal("Default", null, null, new OverlayDialogOptions()
|
||||
@@ -30,6 +30,7 @@ public partial class MainWindow : Window
|
||||
});
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedParameter.Local
|
||||
private void AloneDialogButton_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_aloneDialogService.ShowModal("Default", null, null, new DialogOptions()
|
||||
@@ -38,6 +39,7 @@ public partial class MainWindow : Window
|
||||
});
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedParameter.Local
|
||||
private void DrawerButton_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
_drawerService.ShowModal("Default", null, null, new DrawerOptions()
|
||||
|
||||
Reference in New Issue
Block a user