title: How to dynamically generate .txt file(Notepad file)
body: <pre><code>&lt;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"&gt;
  
  &lt;Canvas x:Name="LayoutRoot" Margin="14,32,10,8"&gt;
      &lt;Label x:Name="lbl_fname" Content="First Name" Height="34" Width="87" Canvas.Left="13" Canvas.Top="21"/&gt;
      &lt;TextBox x:Name="txt_fname" Height="34" TextWrapping="Wrap" Text="Chandra" Width="93" Canvas.Left="203" Canvas.Top="21"/&gt;
      &lt;Label x:Name="lbl_lname" Content="Last Name" Height="34" Width="87" Canvas.Left="13" Canvas.Top="59"/&gt;
      &lt;TextBox x:Name="txt_lname" Height="34" TextWrapping="Wrap" Text="Sekaran" Width="93" Canvas.Left="203" Canvas.Top="59"/&gt;
      &lt;Label x:Name="lbl_age" Content="Age" Width="87" Height="34" Canvas.Left="13" Canvas.Top="97"/&gt;
      &lt;TextBox TextWrapping="Wrap" Text="22" Width="93" Height="34" Canvas.Left="203" Canvas.Top="97"/&gt;
      &lt;Button Content="Save" Height="40" Canvas.Left="98" Canvas.Top="178" Width="112"/&gt;
  &lt;/Canvas&gt;
  </code></pre>
  
  <p></p>
  
  <p>it's output like this </p>
  
  <p><img src="https://i.stack.imgur.com/pSTdl.png" alt="enter image description here"></p>
  
  <p>If i click the Save button the above details should be save as text document file (.txt) like below figure.i have to save this file in my local disk d:\Mydetails\notebook.txt. what should i do for that.</p>
  
  <p><img src="https://i.stack.imgur.com/NcFBM.png" alt="enter image description here"></p>