WpfMenu1 ( WPF )

Objectives:

  • SaveFileDialog, OpenFileDialog
  • FlowDocumentReader
  • <DockPanel>
  • TextBox :
    • VerticalScrollBarVisibility="Auto"
    • Text_Change
  • FileStream fs = File.Create(createFile);
    StreamWriter sw = new StreamWriter(fs);
    sw.Write(txtContainer.Text);
  • Code : MainWindow.xaml.txt, MainWindow.xaml.cs.txt
Step:1 Create a New project

 

Step:2 Add a Docking Panel and drag a Menu control

Now go back to design and Select Items as shown below.

Add MenuItem

You may resize Docking and Menu bar controls to appear like a column.

Step:3  Run time View

a) Creating New File in the local hard-drive: Enter a filename and use New menu to create a new file.

b) Reading file with Open

c ) Saving Edited File

Now Again open File

Step:4
Step:5
Step:6
Step:7
Step:8
Step:9
Step:10
Step:11
Step:12
Step:13
Step:14
Step:25
Step:16
Step:17