<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="Traning.dynamicnotpadxaml"
x:Name="Window"
Title="dynamicnotpadxaml"
Width="346" Height="303">
<Canvas x:Name="LayoutRoot" Margin="14,32,10,8">
<Label x:Name="lbl_fname" Content="First Name" Height="34" Width="87" Canvas.Left="13" Canvas.Top="21"/>
<TextBox x:Name="txt_fname" Height="34" TextWrapping="Wrap" Text="Chandra" Width="93" Canvas.Left="203" Canvas.Top="21"/>
<Label x:Name="lbl_lname" Content="Last Name" Height="34" Width="87" Canvas.Left="13" Canvas.Top="59"/>
<TextBox x:Name="txt_lname" Height="34" TextWrapping="Wrap" Text="Sekaran" Width="93" Canvas.Left="203" Canvas.Top="59"/>
<Label x:Name="lbl_age" Content="Age" Width="87" Height="34" Canvas.Left="13" Canvas.Top="97"/>
<TextBox TextWrapping="Wrap" Text="22" Width="93" Height="34" Canvas.Left="203" Canvas.Top="97"/>
<Button Content="Save" Height="40" Canvas.Left="98" Canvas.Top="178" Width="112"/>
</Canvas>
它的输出是这样的
如果我单击“保存”按钮,上述详细信息应保存为如下图所示的文本文档文件 (.txt)。我必须将此文件保存在我的本地磁盘 d:\Mydetails\notebook.txt 中。我该怎么做。