Silveright 4 RelativeSource Binding with FindAncestor

The bad news. The folks at Microsoft still haven’t developed the FindAncestor relative source binding into SL4. The good news, I find a guy that was resourceful enough to write his own.

Please check out this great article. The source code is at the bottom of the article. You just need to extract the classes out and put into your own project. Took me about 5 minutes.

http://blog.thekieners.com/2010/09/08/relativesource-binding-with-findancestor-mode-in-silverlight/

I am testing it out more tonight, but seems to do the trick. So much nicer to now have my item template be able to reach the parent context.

Oh, and he even made the greatest simple addition. It has the built in feature to auto search for the nearest DIFFERENT datacontext. How great is that? Makes the xaml def even easier to write.

Happy coding!

Did the terrorists win? Flying now has a steep personal rights cost.

“Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety.” Benjamin Franklin

 

It seems the terrorists have secured a big win. A handful of terrorists have caused millions of Americans that used to enjoy travelling to suffer. I find it amazing. If you think about the minimal costs that Al-Qaida incurred in training a few pilots and sending them off with box cutters to the daily intrusions every air traveling American now faces, it’s almost comical.

I used to go to the airport relatively close to when the plane was going to take off. You could walk on the plane right before they closed the doors to taxi off and you could carry a nail file, pocket knife or whatever with you on the plane. Now, I have to arrive 2-3 hours before and prepare myself to go through more and more restrictive security. How many soda’s, coffees, colognes, etc have been thrown away because you can’t carry liquids anymore? How many people get to be manhandled, frisked, and touch inappropriately in the name of safety?

It seems that the response the government provides to every issues is that of a reactionary one. Someone carries a bomb in their underwear, so now every American citizen gets to give up their personal liberties and have some guy who decided he wanted to work security rub his hands up your groin. I am just waiting for the next terrorist to carry a bomb like they convicts do in prison, in their anal cavity. Will everyone then be forced to endure prison style “cough and bend over” searches? I imagine that there is a room of pencil pusher that are considering just that. Of course, you can always have them look at you naked with a body scanner and get a few doses of radiation. That sounds like a great option…

The damage a terrorist can do by detonating a plane is horrible. Is it the worst thing though? No, there are number of much more effective attacks. How many people are on a plane, 200? 300? We all know if someone stood up in a plane with even a gun, people would tackle the guy. Some might die, but most would live.

There are a number of better targets a terrorist could hit. Stadiums have 40,000 people. Bus terminals, subways, are all much better targets. Well placed bombs in a subway would shut down major cities. Do people riding the subway need to be body scanned, sniffed, groped and probed to make sure those are secure? Not yet, but wait until someone drops a bomb there.

The over reaction of the Homeland Security Department to our perceived threats is an intrusion on our rights and liberties as citizens of this great country. I am a proud American and strongly believe in our personal rights. Our right to travel without having to be treated like terrorists our selves in our own country should go without question. I feel that the selective nature of the security for certain modes of transport are even more ridiculous.

If you are afraid and want to give up all your rights so that you can feel a little safer, then go live in a military ruled country. The more rights we give up, the less rights we have. Plain and simple. The government will step in and rule more of your life and take away more of your personal freedoms for the sake of “security”. I don’t want that security. I would rather take my chances with a guy on a plane than subject all of America to the degradation of our personal rights and freedoms.

I imagine there are some Americans who disagree, and you are all probably politicians or work for the bloated and ineffective department of Homeland Security. We all pay a very high cost every day for the actions a few terrorists took almost 10 years ago. I am still shocked to see it’s been almost 10  years, but wow look at the dividends their actions have returned. Billions on war, Americans liberties stripped and all our lives impacted.

Is it all worth it? Did the terrorists win? You decide.

The Pirate Bay is down….Again???

It looks like The Pirate Bay, http://www.thepiratebay.org/, is down again. It seems their servers are being dodgy or possibly under attack.

Also possible ISP’s have decided to screw with people. Who knows..

Anyway, figured I would chronicle it as I thought it interesting.

NOTE: I don’t endorse doing anything illegal. There are plenty of legal uses of this torrent site.

Silverlight Auto Select for TextBox – Attached Behavior

I was looking for a way to make a textbox highlight itself when clicked. Makes for easier user input when you defaulted values and saves them from having to delete them and then enter their own text. I know, rare for developers to care what the user’s experience is like. ha.

Anyway, I was just about to write my own behavior when I found this one. It was written for Silverlight 3 but works fine in Silverlight 4.

 

Check out his article, much more detailed than I would write.

 http://dnchannel.blogspot.com/2010/01/silverlight-3-auto-select-text-in.html

 

Happy Coding!