|
|
Thank you for this.
A first Trial from my side; I suggest you to download the source and try to build the Project. For me it ends in 13 Errors. Several times "PropertyChanged?.Invoke ..." and others (VS 2012 Express).
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Oh no!
checking that now...
|
|
|
|
|
Got it!
I am using some C#... err.., 5? 6? 4? (kind of confused) functionality.
The nullable invocation parameter
a?.b
I am also using CallerMemberNameAttribute which came with .NET 4.5 I think, and reduce many errors....
(hence I want to show that I use it as a good tip for people to follow!)
All of that to say it work for me, but I am using VS2015 and the latest version of C#....
mm... not to sure how to go about that... VS2015 is free after all!
|
|
|
|
|
There is nothing wrong using a specific version for your sample of VS and/or .NET - you should however state it, so those have not would now...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
OK, just updated the Introduction by stating that VS2015 is needed, and why.
It will get published when it is approved...
Thanks for feedback!
|
|
|
|
|
Thank you for your Feedback. I'm just on installing VS Community 2015 and take an exercise on these new features
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Excellent!
|
|
|
|
|
IMHO, you should use compiler directives and include code for the various versions of DotNet when calling NotifyPropertyChanged is concerned, or at least put a note in the article that describes the changes that are required if you use something older than .Net 5...
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
That's a doozy!
I am trying to write the most simplistic MVVM sample that can be written and explained.
It just so happen that C# 6 + .NET4.5 added some feature which do help write simpler code.
Getting bog down into perfecting the implementation or explaining the fine difference between C# 1,2,3,4,5,6, WinForm, WPF, XAML, .NET3, .NET4, .NET4.5, .NET4.6 is completely out of scope for my article!
Now I can understand that if you don't know the null coalesce article from C# 6 (a?.b ) you could be paralysed by fear or doubt!
After all complaints I decided to add an introductory warning about the requirements, as well as a link to this C# 6 syntax feature: Null-conditional Operators (C# and Visual Basic)[^] (pending moderator approval)
This is as far as I will go into being diverted from my goal of simplistic sample.
|
|
|
|
|
To avoid more complaints I would suggest also links for:
public ObservableCollection<string> AddedNames { get; } = new ObservableCollection<string>(); e.g. C# - The New and Improved C# 6.0[^]
and
OnPropertyChanged(nameof(CurrentName));
Thanks for the article, a 5 for it will be applied soon
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Oh my, you made such progress with C# 6 in such a short time!
And you are right, your C# 6 link is better and more instructive!
(but I already have a link to ObservableCollection)
That will be the last changes before bed!
I did abstain to use nameof to avoid confusing people! but clearly it was not enough!
|
|
|
|
|
|
I try my best
A word to VS Community 2015: I'm not clear about it, but it looks the license is only for 30 days
modified 19-Jan-21 21:04pm.
|
|
|
|
|
well... fear not...
I dunno what gives you this impression, but one year later, it still working at my home!
Here, it's clearly stated that "Visual Studio Community 2015" is free
Free Dev Tools - Visual Studio Community 2015[^]
You might have downloaded Visual Studio "15" Preview Downloads[^]
Which is, confusingly , not the same thing!
I wonder if it will come with a community version...
OK, now I am really off to bed!
|
|
|
|
|
This is good timing as I've recently been learning this pattern whilst using Telerik's Kendo UI components that implement MVVM
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
Lucky us!
|
|
|
|
|
My only suggestions would be to explain the theory behind the pattern, where / why you would use MVVM then move on to the code example. Otherwise a very good article
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
I think this is a tricky question!
That was why I left it open...
I guess it's the difference between UserControl and Control, if that makes sense to you.
UserControl gain in simplicity and functionality with MVVM. Control do not.
|
|
|
|
|
This is really quite bad form; think what would happen if everyone who posted an article also did this.
|
|
|
|
|
I would, but I can't read Austrailian-French.
|
|
|
|
|
Quick Sip Clips by Dogfish Head: 120 Minute IPA - YouTube[^]
I had a bottle or so of this nectar at a company Xmas party (where I was assigned photographer duties).
It greatly reduced the pain.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
|
Ahhhh . . . but I didn't say "strong". I said "Good!".
The implication was, perhaps, that it relieved the pain of dealing with people's vanity was mitigated. It's yummy. And the '90' is down to the price of reasonable beers (for those in a higher pay grade than I).
Looking at the prices on you page-link, I must note that some people have too much money and not enough brains if they buy that stuff.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
A message appeared on my screen somewhere, sometime ago.
It went something like, "Click Here To Upgrade To Windows 10"
Supposedly it was free.
Okay, is this smart or stupid ?
Honestly, I can't tell from here at this moment.
|
|
|
|