|
Leave me out of your trolling.
I, like CDP and many others, have genuine complaints about microsoft's behaviour, over the last ten years -- e.g. their lack of fixing problems that have been causing trouble for people for years, their addition of "features" that serve only to make simple things harder to do, and their intrusions into our property and personal data.
But I will not discuss such things with fanboi trolls like you, who either only ever use computers to write letters to their aging aunties, or blatantly lie about not having problems with windows, because intelligent discussion cannot be had with trolls. Or fanbois.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: have genuine complaints about microsoft's behaviour And no one, that I have seen, has ever said otherwise. The fact that you think I have shows you are not rational on this subject and cannot carry a civilized conversation.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
No, it shows that you're a troll.
End of discussion.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
When you can leave your emotions out of your replies, let me know.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
tl;dr
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
RyanDev wrote: Look at me! I'm a wonderful, lovely person, who is so much more wonderful and lovely than anyone else! Because that's all he ever says.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: Because that's all he ever says. That says a lot about how you interpret opposition on the internet. There's a book written that explains what happened to you as a child to make you this way and for the sake of not embarrassing you online, I'm going to ignore you. But just know, I know why you behave this way, I'm sorry you were treated that way as a child, and I forgive you. Have a good life. I hope you can recover.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
tl;dr
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
When I hear the word: "Blend", I immediately think of Blend Behaviors. These behaviors relieved me to a large extent from Attached Properties (yuck!) and Attached Behaviors (double yuck!). I dislike the latter two entities, because they require a host of static methods and variables in a static class (did I say yuck?), resulting in limited encapsulation and the risk of memory leaks.
However, you don't need to believe me. Read the short article by a renowned expert, Brian Noyes, on the matter:
Attached Behaviors vs Attached Properties vs Blend Behaviors[^]
Today I use Blend Behaviors almost exclusively. Thanks to the Blend team and thanks to Brian for an excellent article that opened a whole new perspective for me!
Get me coffee and no one gets hurt!
|
|
|
|
|
Good grief. I have no idea what you're talking about. I had an inkling that this had to do with WPF, so I guess that is a small saving grace. None-the-less, I will attempt to understand that article, since I am now learning by fire some WPF.
Hope that makes it all clear as mud.
Oh boy.
Marc
Latest Article - Merkle Trees
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
I thought you were either talking about bitcoin or a nice recipe. Summer has arrived where I live so now I am disappointed.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
While Blend behaviors are very popular because of their ease of use, most people tend to make a fundamental mistake with them because they forget that they were introduced for Silverlight and, when they use them in WPF, they make a fundamental mistake. Let's see if you know what it is (hint, it's about event handlers).
This space for rent
|
|
|
|
|
You may be thinking about two possibilities:
a) Traditional event handlers use tight coupling. Something you want to avoid in MVVM. To avoid this, I use a weak event manager inside the behavior, like so:
WeakEventManager<TextBox, RoutedEventArgs>.AddHandler(this.AssociatedObject, "Loaded", setFocus);
b) These behaviors get passed UI elements. In the example above it gets passed a TextBox. This may never happen if the behavior is part of a ViewModel, but I believe it is OK, because the behavior is part of the View, not the ViewModel.
Did you have one of these issues in mind?
Get me coffee and no one gets hurt!
|
|
|
|
|
No, the one I was thinking of was where people tend to disconnect their event handlers in Blend. The number of people I have seen using OnDetaching to handle removing events inside Blend is unbelievable. This method was introduced to support Silverlight and is of no real use in WPF which doesn't actually call it. The problem is, when the containing element is removed the OnDetaching method isn't called, potentially leaking memory.
This space for rent
|
|
|
|
|
Good to know, thanks! I wonder if this still applies in .net 4.6? I will run a few tests to see if OnDetaching is called. I wonder: If it is not called, how does one prevent memory leaks?
Get me coffee and no one gets hurt!
|
|
|
|
|
Use the AssociatedObject.Unloaded event instead.
This space for rent
|
|
|
|
|
Yes! I just figured it out for myself. Thanks so much for confirming I am on the right path! Upvote coming your way.
Get me coffee and no one gets hurt!
|
|
|
|
|
Pete, I found this interesting article about the Weak Event Manager. I quote:
" Whenever the source object lifetime extends beyond the object lifetime of the listener, the normal event pattern leads to a memory leak: the listener is kept alive longer than intended.
The weak event pattern is designed to solve this memory leak problem. The weak event pattern can be used whenever a listener needs to register for an event, but the listener does not explicitly know when to unregister."
It seems with the Weak Event Manager one does not need to be concerned so much about memory leaks?
Weak Event Manager[^]
Get me coffee and no one gets hurt!
|
|
|
|
|
This is sort of true. And yes, I have done a fair bit with this. The basic problem is that the weak event handler doesn't have a deterministic end point - in other words, it could still receive notifications after you think the object has gone out of scope. When it gets collected is entirely down to the GC, so you could have event handling going on unnecessarily past the point you think you're done with it. I've seen occasions where a VM is still receiving notifications after I thought it was out of scope, leading to some interesting memory spikes. In general, if you can control the lifetime of an event, you're better off doing that - this is a philosophy that I've stuck to in the 10 odd years I've been doing WPF.
This space for rent
|
|
|
|
|
Thanks for the good advice!
Get me coffee and no one gets hurt!
|
|
|
|
|
In trying to start VS I accidentally clicked the Blend icon (because they're identical - ya THAT was a great idea), and 20 minutes later Blend finally appeared so I could close it. All the while a tray notification was up saying "Microsoft Blend is busy...".
And I'm sitting there thinking "DOING WHAT THAT TAKES 20 MINUTES FOR CRYING OUT LOUD!!!"
WTF could Blend POSSIBLY be doing that takes 20 minutes to load???
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Blending your personal information with the data on the cloud servers, maybe?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
They really aren't identical - the symbols are different, as are the colours. If it's your first time in Blend, it does a lot of configuration initially.
This space for rent
|
|
|
|
|
The colours(colors) (FTFY ) are identical, but the Blend icon has a little 'B' in it, which is WAAAAY to small for an old guy like me to see.
Not my first time opening it.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|