WPF and Silverlight namescopes and DataContext differences

When authoring a UserControl, you will more often than not end up data binding properties of objects in your XAML file to properties of your UserControl itself. The most elegant way to do this would be without any code-behind at all, using ElementName bindings. <UserControl x:Class="NameScopeExample.MyUserControl"… x:Name="ucName"> <TextBlock Foreground="White" Text="{Binding MyProperty.Description,ElementName=ucName}"/> This scenario works well…

0

Why: InvalidOperationException name cannot be found in the name scope of ‘System.Windows.Controls.ControlTemplate’

(edit : correction following Nick’s comment, about which thread actually creates the elements) This exception is confusing for multiple reasons: the code causing it does works on some occasions, the storyboard(s) referencing the infringing name are valid, an element does exist with the name, and has been declared prior to its reference in the storyboard(s)…

3

Introduction &#224; l’utilisation de ShaderEffects en WPF

La version 3.5 SP1 de WPF permet d’intégrer des effets pixel shader directement à vos applications. Ces effets, accessibles par le biais de la classe ShaderEffect, permettent d’appliquer des effets visuels puissants et complètement personnalisables sans pour autant détoriorer les performances de l’application. Ceux-ci s’exécutent sur un ou des processeurs dédiés de la carte graphique,…

0