I have a user control that I have in a StackPanel within my MainWindow and I want to add X number of these controls using an XML file.
<StackPanel DataContext="{Binding Source={StaticResource HydraDataSource}}" ><local:ButtonSlider x:Name="SliderButton1" ButtonText="{Binding XPath=DSPEngine/Process/@Name}" LabelText="{Binding XPath=DSPEngine/Process/@Metric}" SliderMax="{Binding XPath=DSPEngine/Process/@Max}" SliderMin="{Binding XPath=DSPEngine/Process/@Min}" SliderValue="{Binding XPath=DSPEngine/Process/@Value}" Height="80" Width="155"/></StackPanel>
The ButtonSlider user control properties are populated using the XML data attributes for each node.
Could someone help me out with the code behind for my MainWindow showing how I would read the xml data and add more controls at startup?
Jeff Davis