I have been working on a CustomControl which contains an ItemsControl. I have added a dependency property so i can set the ItemsSource property of the ItemsControl in the XAML where the control is used. I have declared my array of custom objects directly in the XAML. This works quite nicely however i have hit a problem with binding any of the public properties on the custom objects in the XAML. The custom objects are not dependency objects...
I would appreciate some pointers.
If this is too convoluted to achieve in XAML i will just bind the ItemsSource to a property on my view model...
XAML:
<local:OptionsControl Title="Options" Message="Select an option:">
<local:OptionsControl.Options>
<x:Array Type="{x:Type local:OptionInfo}">
<local:OptionInfo Name="OptionOne" SelectCommand="{Binding ?"}/>
<local:OptionInfo Name="OptionTwo" SelectCommand="{Binding ?"}/>
<local:OptionInfo Name="OptionThree" SelectCommand="{Binding ?"}/>
</x:Array>
</local:OptionsControl.Options>
</local:OptionsControl>