2

Closed

TargetType in WPF

description

Page 11 says "Some XAML elements use a TargetType attribute to specify the type of element being referenced. For example, Styles use TargetType to specify the type of element being styled. WPF requires a more verbose nomenclature than Silverlight" ACtually, TargetType="Button" works both in WPF and Silverlight.
Closed Jul 17, 2009 at 10:21 PM by stevenporter77
Fixed in version 1.1

comments

linksaussen wrote Jun 16, 2009 at 12:18 PM

Right. In WPF the TargetType-Property is of type System.Type. So a TypeConverter converts the string "Button" to typeof(Button), or in XAML sense to {x:Type Button}. So you have both options, either pass "Button" or pass "{x:Type Button}".

wrote Jun 16, 2009 at 11:57 PM

wrote Jun 17, 2009 at 6:09 PM

wrote Jul 17, 2009 at 5:44 PM

wrote Jul 17, 2009 at 10:21 PM

wrote Feb 14, 2013 at 2:20 AM

wrote May 16, 2013 at 7:24 AM