tags:

views:

38

answers:

1

How can I do something like this?

<Style TargetType="Grid">
   <Setter Property="Children">
      <Setter.Value>
         ...
      </Setter.Value>
   </Setter>
</Style>

I know Children in read-only and this gives me "Writable property expected" on Children.

Thanks

+3  A: 

You can't because Panel.Children is not a DependencyProperty. You almost certainly want to use an ItemsControl with a customized ItemsPanel. However, without more information I couldn't really say for sure.

HTH,
Kent

Kent Boogaart