Skip to main content

Posts

Showing posts with the label XAML

WPF Debounce trick

Sometimes you have to appreciate the power and simplicity that WPF(and by extend XAML has to offer). While having to do a lot of voodoo magic with Reactive Extensions to support debouncing , in WPF it can be reduced to one binding property,  the Delay Binding Property . You can use the WPF Delay binding property to debounce binding events. For example following code will debounces the key input until nothing changes for 0.5 seconds: Text="{Binding UserName,UpdateSourceTrigger=PropertyChanged,Delay=500}" Sweet!

ReactiveList: ObservableCollection on steroids

If you ever build an MVVM style application before(using WPF, Silverlight, UWP,…) you probably used the ObservableCollection class.  It implements the INotifyCollectionChanged interface and can be seen as the counterpart of INotifyPropertyChanged. Through this interface the ObservableCollection notifies its subscribers about items being added, deleted, moved, … Unfortunately the ObservableCollection is rather limited in it’s behavior and doesn’t fit well in a truely observable architecture. Luckily the ReactiveUI framework and more specificly the ReactiveList solve exactly this problem… Let’s describe a scenario I had to build that was hard to do using ObservableCollection and a walk-in-the-park with ReactiveList: In our application we have to show a list of alerts and update the list when new alerts arrive. However alerts can arrive at a high pace and we don’t want to update the UI continuously but only when at least 5 alerts are raised. In our original implementat...

Telerik WPF controls: XAML vs NoXAML

On a WPF project we are using the WPF controls from Telerik. Inside the Telerik folder we noticed that their are actually 2 versions of the binaries available; a ‘normal’ and a NoXaml version. So what’s the difference and which one should I choose? The normal assemblies contain some components together with a default set of styles and ControlTemplates. As most assemblies contain multiple components this can start to add up, as styles and templates for every component are provided. This also means that some of these assemblies are big. To decrease the file size, a NoXaml version of the assemblies was created including only the components themselves but no xaml code(styles, brushes, controltemplates,…). However as the NoXaml version doesn’t contain any visualization information, using these alone will not make much sense. No visual output will be rendered on the screen. A NoXaml dll should therefore always be combined with a theme dll. So which one should you pick? If you are onl...

Templates for Windows 10 Universal Apps

To speed up the creation of a Windows 10 Universal App, Intense created a set of free templates to get you started. From the site: Controls, templates, and tools for building Universal Windows Platform apps on Windows 10. The Intense toolkit consists of two parts; a library of controls and helpers distributed as NuGet package, and a Visual Studio extension with project templates for creating new UWP apps. Intense Templates Adds new project and item templates to Visual Studio 2015 for creating Universal Windows apps. The templates are available in both C# and Visual Basic flavors. Blank App Composition App Composition XAML App Content App Navigation App SplitView App You can download the required Visual Extension from the Visual Studio Gallery: https://visualstudiogallery.msdn.microsoft.com/b7076e96-d4ab-4150-b2c6-12730abd5666

TFS 2013 XAML Builds: BuildDetail variable no longer available

After upgrading a customer from TFS 2012 to TFS 2013, we couldn’t access the BuildDetail property anymore inside our XAML build process template. Instead we got the following error message: Error 102 Compiler error(s) encountered processing expression "BuildDetail.DropLocation". 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. This is a breaking change when upgrading from TFS 2012 to TFS 2013. Luckily it is not hard to solve: Open your XAML build process template Add a Variable on the Variables tab Choose IBuildDetail as type Name it BuildDetail Drag a GetBuildDetail activity inside your workflow Set the Result property to the BuildDetail variable Now you can access the same information as before…