Комментарии:
I also asked you a similar question about login dialog box and you posted a video for that. Awesome video Brian, we are learning really cool lessons from you. It was only because of you I was able to complete my MVVM project and I landed in my new job.
ОтветитьThe video is great, it helped me a lot, thank you❤
ОтветитьI'm not sure if I see how wrapping a dialog with an interface class solves the layer violation caused by opening a dialog from the view model? Shouldn't the dialog be generated by the view?
ОтветитьAnother amazing video. I'm still trying to wrap my head around it but there is a ton here that have questions on.... I just need to get use to the abstraction that you are talking about. Again, great video.
ОтветитьCan you please share git repo for this ?
ОтветитьHaving names like "ExecuteShowDialog" or "ShowDialog" inside VM isn't itself wrong? because essentially we are exposing "What we are doing on UI" to the View Model. It would be worth mentioning that you used this kinda naming for example only...or a video about what kinda naming is allowed in VMs and What's not, or what's a clear no-no and what's Yes-yes etc.. Anyway, Thanks for the video, it was really good!
ОтветитьWhat if I want to show the Dialog CenterOwner? Using this service means that the dialog does not have an owner. What to do?
ОтветитьHi Brain,
Could you please guide us how to implement WPF application on Dual or multiple monitors ?
What would i do if my views resides is within another project in the same solution but can't reference that project?
ОтветитьThank you for this amazing content. but one thing I couldn't figure it out is this: you created your Dialog Service and the corresponding interface in the "View" project and also your "View Model" is in the same project so you are able to access the class. but if I have my "View Model" in other project how can I access the Dialog Service from "View" project? If I want to use the Dialog Service class I have to add "view" project reference to my "View Model" project which is not ideal from MVVM point of view. if I want to define Dialog Service in "View model" project so I can have access to it then I can't create the instance of the "DialogWindow" Window from "View Model" project. How to overcome this dependencies ? or is allowed to have "DialogService" class that is defined in "View" specifically?
ОтветитьBy following your video and type the code shown in it, I have learnt in this hour more than in the month before. That was a huge motivation - boost. Thank you very very much. And whenever you come to germany - your coffee is for free - forever ;-) !!!!
ОтветитьThanks, I learned a lot in this video.
ОтветитьIn what part of the project the dialogservice is located? Is it a public class in the core (viewmodel+model) or is it part of the view? Thanks for the tutorial, I'm going to work out how a viewmodel can initiate another viewmodel with relevant view.
ОтветитьHi Brain,
I need help.
Actually I have an Item Control and when I populate the same with data it comes around 50-80 item in the Grid Each Item Control has button. On click of that button I wanted to open popup but that pop-up should be inside the item control area.
Could you please help me
I like you approach, but I run into a problem, with how to map the viewmodels to views.
I can ofcause do it in the xaml, under
<DataTemplate DataType="{x:Type controls:QuestionBoxViewModel}">
<controls:QuestionBoxView />
</DataTemplate>
but I want to use the register viewmodels/views, for that, that must be possible somehow..
Thanks good stuff ;-)
always thanks
ОтветитьExcellent video and explanation of how everything works and why etc. I wish everyone did tutorials this clearly!
ОтветитьHi Brian, this is so cool and thanks for a thorough explanation throughout the video!
I do have a question though; how to register a viewModel that accepts some parameters?
Nice video! Thanks for uploading. Solved a lot of my questions regarding MVVM-Dialog coding ethics.
ОтветитьHi Brian, nicely explained video. I'm creating an application that has a textbox and a button "search". The searchbutton would open a new dialog. So far so good thanks to your video. But what my app needs is that the input from the textbox is passed as a parameter (or some other way) into the viewmodel of the new dialog, some code would then populate a combobox based on content from the textbox and the selected item is then returned back to the original viewmodel that opened the dialog. Can you help me?
ОтветитьI have an application I'm trying to develop for my company that uses Dialog windows for receiving and returning input from a user to a ViewModel. Is it a better practice to have a DialogueWindow template and inject Views into the window by setting the content? Currently I have each view defined as a window instead of a user control, but I'm not sure if that's the appropriate way to do things. I'm pretty new to MVVM and WPF.
ОтветитьHi Brain, Thanks for such a great video.. I am working on an application where I need to show a keyboard dialog for user input. I also need to restrict the user to enter a value between min & max range. I have a KaypadViewModel with min, max and userInputValue properties. I followed your video and able to display the keypad but I am not able to figure out how i can exchange data between my KeypadViewModel and MainWindow. Can you please share your thoughts on this? Thanks a lot
ОтветитьHi . i love your content . I also have a question . if i close app i want to do some clean up in VM but Destroy is not trigger. How to make it work ? Can you make a short tech answer about that ? Also when i close app not even OnNavigatedFrom. is not triggered . Maybe will be a good subject for a short tech question . Thank you
ОтветитьThanks for the video it is really helpful. I wonder is a Dialog Service a part of View or ViewModel? it looks to me as it's neither, because if its part of VM then you call DialogWindow from VM which is violation of MVVM. So isn't it another layer in the MVVM between View and ViewModel? It also looks a s a way to extract code from code-behind to another file? I'm just curious and any insight would be great :)
ОтветитьHi Brain, Thanks for the video. So If I want to pass any data to NotificationDialog ( Data is binded to textblock control), How do i do that?
ОтветитьHey Brian, great video as always. I have a question, how to use dialog service to show progress dialog? Need to block clicking other buttons until awaited task finish.
ОтветитьI have a tech question : how do i pass ViewModel Object with data to Commandparamter in MVVM in ICommand if i have two diferent types of Model or exists easier approach to achieve that ?
ОтветитьI trapped into your fingers in thumbnail. I couldn't avoid it.
ОтветитьLooking forward to more videos like these! I am a real fan of your presentation style :)
ОтветитьHi Brian. Appreciate the huge effort and helpful videos you are putting out. I understand that in this video you are implementing a "mini" version of the IDialogService already in Prism. I am currently using the IDialogService in Prism. When I try to .showDialog and specify a Window not a Usercontrol it gives me an error "System.InvalidOperationException: 'Window must be the root of the tree. Cannot add Window as a child of Visual.' Is this because the IDialogService in Prism only allows usercontrols to be injected into a blank window? I believe you might of faced the same issue in your Outlook series right? Would I need to modify the IDialogService in Prism?
ОтветитьI have a tech quesion,
How can we print documents and pictures with print preview in MVVM
I hope you can help me
thanks in advance
How To make "select all" in datagrid with mvvm?
ОтветитьThis is really neat, but sometimes it's okay to break the rules to get something simple done and move on. When separation of concerns becomes a religion, it's a concern.
ОтветитьAwesome content, thanks!!
ОтветитьThat's so awesome! You inspired me to keep on practicing with C#, and this topic was one of my main questions - always has been. Now, about some time ago, I found my own way of doing this mvvm compatible. Now I am so excited to learn what your approach is! Many of that little step stones on the way to my own solution I learned to overcome thanks to your videos. Now, I am no programmer to make a living out of it, so I cannot allow me to judge on this behalf, but I am a teacher, so I know a thing or two about teaching, didactics, motivating people and the likes. You sir are an absolute brilliant teacher! Thank you!
ОтветитьBrian, this is a great refresher for Prism's Dialog functionality.
Your timing is perfect for the Prism.Avalonia project. This is literally the last piece for the v8.x upgrade; hard to find free time w/ office work's end of year crunches.
Thanks very much! Looking forward to more fancy WPF skills from here!
ОтветитьThis is really great! I was wondering if you could do something with dependency injection. I see it a lot but I can't seems to find someone to explain and show how to do it easily! Thank you in advance :)
ОтветитьAll that goodness can be achieved by using Prism)
ОтветитьHi: you mentioned you would normally inject the DialogService into the (ViewModel?) constructor. So do you usually only have one instance of a DialogService which is part of the ViewModel construction parameters? Also, is your DialogService a singleton or do you leave the possibility of having multiple instances of DialogService?
ОтветитьHi Brian. Thanks for the great content. What is the best approach to implement drag and drop on a treeview with mvvm?
Ответитьawesome, many thanks for your very nice tutorial
ОтветитьThis is a good reminder, thank you. I'm still wrapping up Prism.Avalonia v8.x upgrade and DialogService is the last piece missing, which I'm trying to find time to wrap up.
ОтветитьThis is how IDailogService in prism works ??
ОтветитьI asked this almost a year ago! 😆
ОтветитьFascinating!
ОтветитьAmazing
ОтветитьI asked this question 😁
Thanks Brain 🙂