我创建了一个应用程序,它根据xml文件中的值绘制组织树.
xaml文件是这样的:
<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">
---------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我希望能够通过从openfiledialog中选择一个xml文件(如按钮点击)在运行时更改源代码,我该怎么做?