New Solution
. This will open a dialog with Project Types on the left and some input fields on the right.Other
you will see Avalonia .NET Core MVVM App
select it and then type Avalonia.MusicStore
as the Solution Name
. Everything else can be left as default.Create
button.Images
, Icons
, Fonts
etc, anything that the UI might need to display,ViewModels
of the project. Viewmodels should only contain UI logic. Button is enabled when the user has typed something. Open a dialog when the user clicks here, show an error if the user enters too high a number type of logic.Views
of the project. Views are like HTML for native application, they describe the look and layout of your UI, but not the UI logic.INotifyPropertyChanged
for more on that.)MainWindow
xaml
UI code that describes how the MainWindow
looks and its contents.xaml
file that sets up the application, it chooses the the theme the UI will use and declares the ViewLocator
DataTemplate
.Main
method where the program starts and Avalonia
is configured and started.ViewLocator
is a special DataTemplate
. When some Data
appears in the UI, it quickly looks to see if a View
exists for it. This is done by naming convention. If the datas Type
is MyDataViewModel
then the ViewLocator
will use the View
named MyDataView
(if it exists) in that part of the UI. This is very powerful for list based controls (ItemsControl
, ListBox
, etc) and ContentControl
.