TAG: behaviors

WinDays 16 session: UWP XAML Behaviors

This was my fifth year in a row of speaking at the most important Microsoft conference in Croatia, WinDays 16, where I gave two session. The first one was about XAML Behaviors, and the second one was about Entity Framework Core 1.0 in UWP apps. This article has the presentation I gave about XAML Behaviors plus the link to the demos for that session. PowerPoint presentation: Link to GitHub demos: https://github.com/igrali/UWP-Behaviors-demo…

UWP DropImageBehavior - drag and drop photos using a behavior

I wrote a simple but useful UWP behavior that's based on the great XAML Behaviors SDK and allows easy, reusable way to add drag and drop support for photos. The idea is to just be able to define the behavior on the drop surface and set the target image object. Dragging and dropping images usually takes some code behind unless behaviors are used so it can be plugged in anywhere in XAML declaratively. Here's the code…

Focus a TextBox from ViewModel using a simple behavior

Let's assume a simple scenario - you have a Windows Phone page connected to a ViewModel (VM) with everything bound nicely. A TextBox text property is connected to a string in VM, and when you change it, you wish to put focus on the TextBox. How to accomplish this considering that all your logic is actually in the VM separated from the View? Simply, using a focus behavior. Let's start with a simple UI. We have…

Microsoft Certified Solutions Developer: Windows Store Apps in C#