I made an application which draws a tree of organization based on values from an xml file.
The xaml file goes like this :
<Window.Resources>
<!-- The Org Chart Data-->
<XmlDataProvider x:Key="organization" Source="model.xml" />
<SolidColorBrush x:Key="ListBorder" Color="#FF7F9DB9"/>
<!-- The Style for Nodes -->
<Style TargetType="{x:Type draw:Node}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Template">
---------------------------------------------------------
I want to be able to change the source at runtime by selecting a xml file from openfiledialog (like button click) how do i do that?