contentproperty

How do I resolve the WPF Designer error 'The type {0} does not support direct content'.'?

Hi, The following XAML (below) defines a custom collection in resources and attempts to populate it with a custom object; <UserControl x:Class="ImageListView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="300" Height="300" xmlns:local="clr-nam...

WPF - Is there a good reason that Setter.Value isn't a ContentProperty?

Every time I write out a setter whose Value property value isn't describable inline, I curse the fact that the API doesn't mark the Setter class with [ContentProperty("Value")], which would allow this: <Setter Property="BitmapEffect"> <Setter.Value> <OuterGlowBitmapEffect GlowColor="#AAC" Opacity="0.2" GlowSize="1.25" /> </Sette...

Collection instance with ContentProperty on XAML errors out

Hi I have a observable collection as follows.... I used to get designer ignorable error as "type(0) does not support direct content" due to which I implemented ContentProperty as shown below... but now I get two unavoidable errors at the designer as 1.The object 'CustomDataGridColumnCollection' already has a child and cannot add 'Da...

Binding-Target never gets set in custom objects declared in *.resources; binding evaluation fails

I have a xaml view like this: <Tv:TvPanel xmlns:Tv="..."> <Tv:TvPanel.Resources> <Tv:Parameters x:Key="parameterList"> <Tv:ParameterDefinition ParameterName="MyParam" InitialValue="123abc"> <Tv:ValueBinding Value="{Binding ElementName=myTextBox, Path=Text}"/> </Tv:ParameterDefinition> </Tv:Parameters> <Tv:TvXmlDataPr...

Silverlight: Use reflection to get the BindingExpression (and value) for controls having a ContentProperty

Hello, I need to use reflection to get the binding value in a control that is a DataGridTemplateColumn (e.g HyperLinkButton). Does anyone know how I might do this? It seems simple enough to do this with a TextBlock because it has a “TextProperty” dependency property, but I can’t seem to get a binding expression from a control that does ...

Silverlight 4 ContentPropertyAttribute voodoo

I'm running into some very anomalous behaviors that I'm having some trouble understanding. Basically, I've redone Colin Eberhardt's MultiBinding technique as a behavior (System.Windows.Interactivity) - mostly because I have a lot of other behaviors and this results in cleaner xaml. Along the way I tried to figure out why the ContentPrope...