diff --git a/demo/Sandbox/App.axaml.cs b/demo/Sandbox/App.axaml.cs index c6033ba..3ead0df 100644 --- a/demo/Sandbox/App.axaml.cs +++ b/demo/Sandbox/App.axaml.cs @@ -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; diff --git a/demo/Ursa.Demo.iOS/AppDelegate.cs b/demo/Ursa.Demo.iOS/AppDelegate.cs index a565165..2954d1a 100644 --- a/demo/Ursa.Demo.iOS/AppDelegate.cs +++ b/demo/Ursa.Demo.iOS/AppDelegate.cs @@ -1,9 +1,6 @@ using Foundation; -using UIKit; using Avalonia; -using Avalonia.Controls; using Avalonia.iOS; -using Avalonia.Media; namespace Ursa.Demo.iOS; diff --git a/demo/Ursa.Demo/Converters/IconNameConverter.cs b/demo/Ursa.Demo/Converters/IconNameConverter.cs index 4d1fe99..98c82c6 100644 --- a/demo/Ursa.Demo/Converters/IconNameConverter.cs +++ b/demo/Ursa.Demo/Converters/IconNameConverter.cs @@ -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(); } diff --git a/demo/Ursa.Demo/Converters/IconNameToPathConverter.cs b/demo/Ursa.Demo/Converters/IconNameToPathConverter.cs index 4451895..d9e2a08 100644 --- a/demo/Ursa.Demo/Converters/IconNameToPathConverter.cs +++ b/demo/Ursa.Demo/Converters/IconNameToPathConverter.cs @@ -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; } diff --git a/demo/Ursa.Demo/Converters/TimelineIconConverter.cs b/demo/Ursa.Demo/Converters/TimelineIconConverter.cs index 04d46f4..8197a63 100644 --- a/demo/Ursa.Demo/Converters/TimelineIconConverter.cs +++ b/demo/Ursa.Demo/Converters/TimelineIconConverter.cs @@ -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(); } diff --git a/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs b/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs index bfd9c76..fcbe6a4 100644 --- a/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs +++ b/demo/Ursa.Demo/DataTemplates/ToolBarItemTemplateSelector.cs @@ -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() { diff --git a/demo/Ursa.Demo/DataTemplates/ViewLocator.cs b/demo/Ursa.Demo/DataTemplates/ViewLocator.cs index fbbbece..15e3d99 100644 --- a/demo/Ursa.Demo/DataTemplates/ViewLocator.cs +++ b/demo/Ursa.Demo/DataTemplates/ViewLocator.cs @@ -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) diff --git a/demo/Ursa.Demo/Dialogs/DialogWithAction.axaml.cs b/demo/Ursa.Demo/Dialogs/DialogWithAction.axaml.cs index 783f47b..08724f8 100644 --- a/demo/Ursa.Demo/Dialogs/DialogWithAction.axaml.cs +++ b/demo/Ursa.Demo/Dialogs/DialogWithAction.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Dialogs; diff --git a/demo/Ursa.Demo/Dialogs/PlainDialog.axaml.cs b/demo/Ursa.Demo/Dialogs/PlainDialog.axaml.cs index 1e4be06..4110bb6 100644 --- a/demo/Ursa.Demo/Dialogs/PlainDialog.axaml.cs +++ b/demo/Ursa.Demo/Dialogs/PlainDialog.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Dialogs; diff --git a/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs b/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs index 5bc2485..cffff7d 100644 --- a/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/AvatarDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/BadgeDemo.axaml.cs b/demo/Ursa.Demo/Pages/BadgeDemo.axaml.cs index eec79bf..7caa06c 100644 --- a/demo/Ursa.Demo/Pages/BadgeDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/BadgeDemo.axaml.cs @@ -1,4 +1,3 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; diff --git a/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs b/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs index 72a772d..cd7b94d 100644 --- a/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/BannerDemo.axaml.cs @@ -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 _types; + private ObservableCollection? _types; - public ObservableCollection Types + public ObservableCollection? Types { get => _types; set => SetProperty(ref _types, value); diff --git a/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs b/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs index c119fc7..1f63393 100644 --- a/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/BreadcrumbDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/ButtonGroupDemo.axaml.cs b/demo/Ursa.Demo/Pages/ButtonGroupDemo.axaml.cs index 533130a..5b00129 100644 --- a/demo/Ursa.Demo/Pages/ButtonGroupDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/ButtonGroupDemo.axaml.cs @@ -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(); } } \ No newline at end of file diff --git a/demo/Ursa.Demo/Pages/ClassInputDemo.axaml.cs b/demo/Ursa.Demo/Pages/ClassInputDemo.axaml.cs index 30e502a..851cb7b 100644 --- a/demo/Ursa.Demo/Pages/ClassInputDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/ClassInputDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs b/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs index 058136a..3db30dd 100644 --- a/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/ClockDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs b/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs index e38d30d..74214c7 100644 --- a/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/DatePickerDemo.axaml.cs @@ -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()); } diff --git a/demo/Ursa.Demo/Pages/DialogDemo.axaml.cs b/demo/Ursa.Demo/Pages/DialogDemo.axaml.cs index 2453f1a..ed838eb 100644 --- a/demo/Ursa.Demo/Pages/DialogDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/DialogDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/DisableContainerDemo.axaml.cs b/demo/Ursa.Demo/Pages/DisableContainerDemo.axaml.cs index 68b6fbd..0476b6c 100644 --- a/demo/Ursa.Demo/Pages/DisableContainerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/DisableContainerDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/DividerDemo.axaml.cs b/demo/Ursa.Demo/Pages/DividerDemo.axaml.cs index bdd3bd4..9f3018a 100644 --- a/demo/Ursa.Demo/Pages/DividerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/DividerDemo.axaml.cs @@ -1,4 +1,3 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; diff --git a/demo/Ursa.Demo/Pages/DrawerDemo.axaml b/demo/Ursa.Demo/Pages/DrawerDemo.axaml index 2429a65..96b1eac 100644 --- a/demo/Ursa.Demo/Pages/DrawerDemo.axaml +++ b/demo/Ursa.Demo/Pages/DrawerDemo.axaml @@ -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" diff --git a/demo/Ursa.Demo/Pages/DrawerDemo.axaml.cs b/demo/Ursa.Demo/Pages/DrawerDemo.axaml.cs index 3aa8916..788fa0d 100644 --- a/demo/Ursa.Demo/Pages/DrawerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/DrawerDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml.cs b/demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml.cs index da6250a..a1bbd81 100644 --- a/demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/EnumSelectorDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/FormDemo.axaml.cs b/demo/Ursa.Demo/Pages/FormDemo.axaml.cs index 64a5f0c..3881d9b 100644 --- a/demo/Ursa.Demo/Pages/FormDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/FormDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/IPv4BoxDemo.axaml.cs b/demo/Ursa.Demo/Pages/IPv4BoxDemo.axaml.cs index c3a050c..fc8b272 100644 --- a/demo/Ursa.Demo/Pages/IPv4BoxDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/IPv4BoxDemo.axaml.cs @@ -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; diff --git a/demo/Ursa.Demo/Pages/IconButtonDemo.axaml.cs b/demo/Ursa.Demo/Pages/IconButtonDemo.axaml.cs index 4b2931d..bb07fc8 100644 --- a/demo/Ursa.Demo/Pages/IconButtonDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/IconButtonDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml.cs b/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml.cs index 7aa908c..e558339 100644 --- a/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/ImageViewerDemo.axaml.cs @@ -1,7 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Interactivity; -using Avalonia.Markup.Xaml; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/IntroductionDemo.axaml b/demo/Ursa.Demo/Pages/IntroductionDemo.axaml index ba2bbbf..c292152 100644 --- a/demo/Ursa.Demo/Pages/IntroductionDemo.axaml +++ b/demo/Ursa.Demo/Pages/IntroductionDemo.axaml @@ -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" diff --git a/demo/Ursa.Demo/Pages/IntroductionDemo.axaml.cs b/demo/Ursa.Demo/Pages/IntroductionDemo.axaml.cs index ec1ee5c..2dab9c9 100644 --- a/demo/Ursa.Demo/Pages/IntroductionDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/IntroductionDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/KeyGestureInputDemo.axaml.cs b/demo/Ursa.Demo/Pages/KeyGestureInputDemo.axaml.cs index f213756..c5fc35f 100644 --- a/demo/Ursa.Demo/Pages/KeyGestureInputDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/KeyGestureInputDemo.axaml.cs @@ -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); - } } \ No newline at end of file diff --git a/demo/Ursa.Demo/Pages/LoadingDemo.axaml.cs b/demo/Ursa.Demo/Pages/LoadingDemo.axaml.cs index cfbc0e8..65a17f2 100644 --- a/demo/Ursa.Demo/Pages/LoadingDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/LoadingDemo.axaml.cs @@ -1,4 +1,3 @@ -using Avalonia; using Avalonia.Controls; using Avalonia.Markup.Xaml; diff --git a/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml.cs b/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml.cs index 0b5cf40..cfdc4c9 100644 --- a/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/MessageBoxDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; using Ursa.Demo.ViewModels; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs b/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs index 2a51be5..9c67a7f 100644 --- a/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/MultiComboBoxDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/NavMenuDemo.axaml.cs b/demo/Ursa.Demo/Pages/NavMenuDemo.axaml.cs index eac27af..d1bae7d 100644 --- a/demo/Ursa.Demo/Pages/NavMenuDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/NavMenuDemo.axaml.cs @@ -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(); } } \ No newline at end of file diff --git a/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs b/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs index b82a6ae..8e3a09e 100644 --- a/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/NumPadDemo.axaml.cs @@ -1,7 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Input; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml.cs b/demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml.cs index 35df3ef..ea47763 100644 --- a/demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml.cs +++ b/demo/Ursa.Demo/Pages/NumberDisplayerDemo.axaml.cs @@ -1,6 +1,4 @@ -using Avalonia; -using Avalonia.Controls; -using Avalonia.Markup.Xaml; +using Avalonia.Controls; namespace Ursa.Demo.Pages; diff --git a/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml b/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml index 75baa53..610c37a 100644 --- a/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml +++ b/demo/Ursa.Demo/Pages/NumericUpDownDemo.axaml @@ -55,7 +55,7 @@ Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left"> - +