Blog

Cheating customers: The Amazon story with my wife’s Microsoft Band 2

Oh dear, I could tell you stories about cheating customers, because I received broken TVs, e-guitars, mainboards and so on that I ordered as new things online. Here’s the latest story:

I love my Microsoft Band 2. I wear it everyday and I think it’s an awesome device. Last week I ordered a second one for my wife as a birthday gift. As the Band 2 is not available in Germany, I ordered it from Amazon.co.uk. I need to mention I ordered a NEW device, not a used one. I ordered a new one, did I say this already? ;-)
Today it arrived. I opened the amazon box, and inside was the package with the Band 2. The first thing I wondered about: The band package was not closed, it was open. I took this photo below. I hadn’t opened the package at that moment. This is exactly how I got it. Look at the transparent stickers. Looks like someone had opened it and hadn’t closed it correctly:

How the package arrived

But when I opened the package, I looked for fingerprints etc. I saw a few, but it was ok. But when I took the band out of its mount box, I was really shocked and frustrated. It looked like this:

How the band looked like

Why are people doing things like this? It is sooo annoying. If you broke your device, take the responsibility and get a new one. And if you can’t afford it, then wait until you can. So let me just quote my dad:

There are several ways to cheat in your life. Cheating might bring you more money, but not more friends. Now think a minute, what matters more in life!

Whatever. I sent it back – I needed to pay the fee – and I ordered another one. I’m sure Amazon wouldn’t make a problem here. That’s what I love Amazon for. Let’s see if the second one is ok and not broken by a selfish person.

Race condition when using a Binding on a DoubleAnimation inside of a Storyboard

Nice example of a race condition on MSDN Forums, because the Binding is running on a different thread and won’t update in time. Let’s look at the problem: Continue reading “Race condition when using a Binding on a DoubleAnimation inside of a Storyboard”

UWP: The Master-Detail-Problem with the events SelectionChanged & LostFocus and How to Fix it

While creating apps with the Universal Windows Platform (UWP) I noticed a weird behavior, but I’m not sure if it’s a bug. Let’s just call it the “Master-Detail-Problem”.

To explain it, I stripped  down my code to the XAML-snippet below. No code-behind needed. Continue reading “UWP: The Master-Detail-Problem with the events SelectionChanged & LostFocus and How to Fix it”

Developer Week 2016 – it was great

Last week I was at the developer week conference in Germany / Nürnberg. It was a great conference with fantastic people and great sessions.

I gave two talks:

  • S.O.L.I.D.-principles for C# Developers
  • Test Driven Development and MVVM: How to write testable ViewModels

Continue reading “Developer Week 2016 – it was great”

Calling the Azure Event Hub REST-API – from UWP, WPF and any other .NET (Core) Client

To push events into Azure Event Hub you can use the Nuget-package WindowsAzure.ServiceBus (https://www.nuget.org/packages/WindowsAzure.ServiceBus/). That package works pretty straight forward, but there’s one problem:

Continue reading “Calling the Azure Event Hub REST-API – from UWP, WPF and any other .NET (Core) Client”

Render just the first line of a TextBlock

Sometimes you want a TextBlock to just display one line. For example if you have a huge virtualized ListView that contains many data items and in the DataTemplate you’re using a TextBlock. When the TextBlock has different height, the virtualization leads to some not so nice behavior when scrolling: Continue reading “Render just the first line of a TextBlock”

Creating a background application with WPF

Sometimes you need to have an application running in the background. Then you don’t want your MainWindow to be visible all the time. Instead you just want to have an icon in the notification area that allows the user to open up the MainWindow and to exit the application. In WPF you can do this easily with the help of Windows Forms’ NotifyIcon-class.

Continue reading “Creating a background application with WPF”