WpfCommand1( WPF ) |
Objectives:
- Command
- Stack Panel: Menu & Button with Commands
- RichText Box :
- Save did not work the in current Workstation/Server
2008 R2, Framework 4.0
- Cut , Copy, Paste.
- Align Right, Left
- Print the content of Rich Text Box.
- Code :
MainWindow.xaml.2.txt,
MainWindow.xaml.cs.2.txt
some Ref :
- Routed vent and Command
http://msdn.microsoft.com/en-us/magazine/cc785480.aspx
- Composite command
http://msdn.microsoft.com/en-us/magazine/cc785479.aspx
|
Step:1 Create a New project
Final Out look
|
Step:2 Code
MainWindow.xaml.txt ,
MainWindow.xaml.cs.txt
RichText Box accept wide range of Objects like texts and images
Now Go back to Main Window, add another button control that will print the
contents of Rich Text Box.
|
Step:3 Runt time Testing
a) Copy, Cut and Paste using Button/command and Menu/Command respectively.
Copy and Cut will remain disabled till we select some contents. All shortcuts
like Ctrl+A = Select All, Ctrl+V = Paste Clipboard contents, Ctrl+z = Undo and
so on.
Cut Function
Copy and Paste (You may Use Button, Edit Paste or Ctrl+V to
paste the copied items).
|
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
|
|