diff --git a/GetStartedApp/App.axaml b/GetStartedApp/App.axaml deleted file mode 100644 index 77ec138..0000000 --- a/GetStartedApp/App.axaml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/GetStartedApp/App.axaml.cs b/GetStartedApp/App.axaml.cs deleted file mode 100644 index b070be6..0000000 --- a/GetStartedApp/App.axaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Avalonia; -using Avalonia.Controls.ApplicationLifetimes; -using Avalonia.Markup.Xaml; -using GetStartedApp.ViewModels; -using GetStartedApp.Views; - -namespace GetStartedApp; - -public partial class App : Application -{ - public override void Initialize() - { - AvaloniaXamlLoader.Load(this); - } - - public override void OnFrameworkInitializationCompleted() - { - if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) - { - desktop.MainWindow = new MainWindow - { - DataContext = new MainWindowViewModel(), - }; - } - - base.OnFrameworkInitializationCompleted(); - } -} \ No newline at end of file diff --git a/GetStartedApp/Assets/avalonia-logo.ico b/GetStartedApp/Assets/avalonia-logo.ico deleted file mode 100644 index da8d49f..0000000 Binary files a/GetStartedApp/Assets/avalonia-logo.ico and /dev/null differ diff --git a/GetStartedApp/GetStartedApp.csproj b/GetStartedApp/GetStartedApp.csproj deleted file mode 100644 index 254c5f1..0000000 --- a/GetStartedApp/GetStartedApp.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - WinExe - net8.0 - enable - true - app.manifest - true - - - - - - - - - - - - - - - - - diff --git a/GetStartedApp/Program.cs b/GetStartedApp/Program.cs deleted file mode 100644 index 792725e..0000000 --- a/GetStartedApp/Program.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Avalonia; -using Avalonia.ReactiveUI; -using System; - -namespace GetStartedApp; - -sealed class Program -{ - // Initialization code. Don't use any Avalonia, third-party APIs or any - // SynchronizationContext-reliant code before AppMain is called: things aren't initialized - // yet and stuff might break. - [STAThread] - public static void Main(string[] args) => BuildAvaloniaApp() - .StartWithClassicDesktopLifetime(args); - - // Avalonia configuration, don't remove; also used by visual designer. - public static AppBuilder BuildAvaloniaApp() - => AppBuilder.Configure() - .UsePlatformDetect() - .WithInterFont() - .LogToTrace() - .UseReactiveUI(); -} diff --git a/GetStartedApp/ViewLocator.cs b/GetStartedApp/ViewLocator.cs deleted file mode 100644 index 87f5a57..0000000 --- a/GetStartedApp/ViewLocator.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using Avalonia.Controls; -using Avalonia.Controls.Templates; -using GetStartedApp.ViewModels; - -namespace GetStartedApp; - -public class ViewLocator : IDataTemplate -{ - - public Control? Build(object? data) - { - if (data is null) - return null; - - var name = data.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal); - var type = Type.GetType(name); - - if (type != null) - { - var control = (Control)Activator.CreateInstance(type)!; - control.DataContext = data; - return control; - } - - return new TextBlock { Text = "Not Found: " + name }; - } - - public bool Match(object? data) - { - return data is ViewModelBase; - } -} diff --git a/GetStartedApp/ViewModels/MainWindowViewModel.cs b/GetStartedApp/ViewModels/MainWindowViewModel.cs deleted file mode 100644 index e693b16..0000000 --- a/GetStartedApp/ViewModels/MainWindowViewModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace GetStartedApp.ViewModels; - -public class MainWindowViewModel : ViewModelBase -{ -#pragma warning disable CA1822 // Mark members as static - public string Greeting => "Welcome to asdf Avalonia!"; -#pragma warning restore CA1822 // Mark members as static -} diff --git a/GetStartedApp/ViewModels/ViewModelBase.cs b/GetStartedApp/ViewModels/ViewModelBase.cs deleted file mode 100644 index f581440..0000000 --- a/GetStartedApp/ViewModels/ViewModelBase.cs +++ /dev/null @@ -1,7 +0,0 @@ -using ReactiveUI; - -namespace GetStartedApp.ViewModels; - -public class ViewModelBase : ReactiveObject -{ -} diff --git a/GetStartedApp/Views/MainWindow.axaml b/GetStartedApp/Views/MainWindow.axaml deleted file mode 100644 index d080edf..0000000 --- a/GetStartedApp/Views/MainWindow.axaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/GetStartedApp/Views/MainWindow.axaml.cs b/GetStartedApp/Views/MainWindow.axaml.cs deleted file mode 100644 index fc412eb..0000000 --- a/GetStartedApp/Views/MainWindow.axaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Avalonia.Controls; -using Avalonia.Interactivity; -using System.Diagnostics; -using System; - -namespace GetStartedApp.Views; - -public partial class MainWindow : Window -{ - public MainWindow() - { - InitializeComponent(); - } - - public void ButtonClicked(object source, RoutedEventArgs args) - { - if (Double.TryParse(celsius.Text, out double C)) - { - var F = C * (9d / 5d) + 32; - fahrenheit.Text = F.ToString("0.0"); - } - else - { - celsius.Text = "0"; - fahrenheit.Text = "0"; - } - } -} \ No newline at end of file diff --git a/GetStartedApp/app.manifest b/GetStartedApp/app.manifest deleted file mode 100644 index 7597a83..0000000 --- a/GetStartedApp/app.manifest +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - -