Тёмный

015. Avalonia UI - MVVM Injecting Services 

AngelSix
Подписаться 61 тыс.
Просмотров 10 тыс.
50% 1

Support me in my journey to giving back to the industry all my knowledge and helping the world with what I do. Spreading knowledge to those who cannot afford an education, and helping those who want to better themselves.
Avalonia UI
www.avaloniaui.net
Support what I do and pay for me to survive
www.angelsix.com/donate
Live Chat at Discord
discordapp.com/invite/eHr5BMk

Хобби

Опубликовано:

 

18 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 15   
@maikborchardt5692
@maikborchardt5692 Год назад
thank you so much for this Luke
@josbexerra8115
@josbexerra8115 Год назад
Excelente Mister Angel666....emocionado con el curso
@Mosaissei
@Mosaissei Год назад
Yes finally new episode ❤️❤️
@Martin-jw1os
@Martin-jw1os 9 месяцев назад
I'm really enjoing that you showing us here the latest c# features as well.
@loam
@loam Год назад
30:50 - Luke, Rider has similar to Visual Studio's "Quick Watch" window (Shift + F9), which let's you checkout the content of the variable. If you imported the keymap settings from the Visual Studio, it opens with the same shorcut - Shift + F9, or you can configure it in Rider's Settings -> Keymap -> from the grouped list in there open dropdown "Main menu" -> "Run" -> Debugging Actions -> Evaluate Expression I have there two shortcuts for that - Ctrl + Alt + O and Shift + F9 Also, in order to find out which command it is in the keymap settings, because I knew the shortcut is Shift + F9 (I did import settings from Visual Studio), I opened the keymap settings, selected any unused shortcut, pressed it twice in order to add shortcut to it, pressed "Add keyboard shortcut" and in opened small window in the field for shorcut I pressed "Shift + F9" and lower it shows warning with yellow triangle sign - "Already assigned to:" and shows to which command exactly it is assigned and where it can be found. May be this my experience will help somehow, I'm also new to Rider, and I am step by step learning to use it.
@GuildOfCalamity
@GuildOfCalamity Год назад
Would love to see a video dedicated to the new C# features/tricks . Debug.WriteLine(string.Format("> The designer {0} running.", Avalonia.Controls.Design.IsDesignMode ? "is" : "is not"));
@IElial
@IElial Год назад
Thanks for this new video. In the context of MVVM aka [Models | Views | ViewModels] split architecture, I wonder in which part belong Services ? Models or ViewModels. My guess is Models. So I would have regrouped DataModels and Services folder inside a new Models folder in the project. Is that correct ?
@AngelSix
@AngelSix Год назад
It really depends. Many people treat MVVM differently. I see MVVM as mainly for clean UI separation and not an entire application governing thing. The ViewModel is the model that is bound to the View. The Model is what's left... typically data coming from services that is from REST API. Most people just then bundle everything into this "Model" concept. However really I don't feel there is a Model, its just VVM :P. The Model just refers to everything else. I class services as part of the application and they are services in their own right, with a specific task. They have no relation directly to MVVM or its architecture and should not really be grouped into it as such. At best I would say the Model is the class that does the logic to combine the data/services of the application with the ViewModel. But I would not overthink it. Structure the folders and names how you like ultimately.
@mcorplab2719
@mcorplab2719 Год назад
I still can't wrap my head around the dependency injection usage with avalonia. Sure, we can register singleton or transient services and use them via AvaloniaLocator, or create ServiceProvider. But at the end we still have to manually pass every constructor parameter with GetService. Can we wrap avalonia in Host using CreateDefaultBuilder? Or at least can we skip adding constructor parameters manually, like it is with Host?
@AngelSix
@AngelSix Год назад
Once we get to that we will cover it. I will find a way
@mcorplab2719
@mcorplab2719 Год назад
Great can't wait. :)
@JacobChrist
@JacobChrist Год назад
I am loving these videos but something I am having a real problem wrapping my head around is how to open another window from a ViewModel. Specifically I have a bunch of code that runs in my ViewModel that runs as a Task then when the tasks is finished I want to open another window with some results. I am feeling like the ViewModel need to fire off an event that is detected by the View that would then open the Window.
@ghevisartor6005
@ghevisartor6005 Год назад
I don't know about avalonia, in Maui i wrapped App.Current.MainPage.DisplayAlert and the other methods in a service, i inject this service in the viewmodels and it works.
@user-un5kp9qr8o
@user-un5kp9qr8o Год назад
Necroposter here: the recommended way in Avalonia docs is to use the ReactiveUI.Interaction class. It allows you to separate the business logic from the UI related stuff such as showing a window.
@drhdev
@drhdev Год назад
Please do not inject services this way smh
Далее
016. Avalonia UI - Binding To Grouped Collections
18:55
Dependency Injection, The Best Pattern
13:16
Просмотров 780 тыс.
КАК Я ЭТО СДЕЛАЛА?
00:13
Просмотров 423 тыс.
Ne jamais regarder une fille à la plage 😂
00:10
Просмотров 766 тыс.
Don't use VSCode
35:31
Просмотров 217 тыс.
WPF C# MVVM Sample Application
13:16
Просмотров 17 тыс.
Dependency Injection, Generic Host, and WPF
2:44:29
Просмотров 7 тыс.
003. Avalonia UI - Grid Percentage (* Star) Layout
41:02
C#/WPF - Learn MVVM with the .NET Community Toolkit
1:46:13
Is LEARNING WPF still WORTH it in 2023?
10:59
Просмотров 44 тыс.
This UI component library is mind-blowing
8:23
Просмотров 636 тыс.
009. Avalonia UI - Animated Popups Custom Overlays
34:05
Гигантский лук из семян!
0:43
World’s Largest Jello Pool
1:00
Просмотров 96 млн
😳РЫБАК УДИВИЛ ПРОХОЖИХ!
0:12
Просмотров 1,2 млн
World’s Largest Jello Pool
1:00
Просмотров 96 млн