שילוב WPF באפליקציית VSTO מעשיר מאוד את חוויית המשתמש. לדוגמא:

להלן השלבים לשילוב Control של WPF באפליקציית VSTO ב-Visual Studio 2010:
1. יצירת פרוייקט Office Add-in לדוגמא Word Add-in
2. Add Item ובחירה של
Ribbon (Visual Designer)
3. Add Item ובחירה של
Windows Form
4. Add Item ובחירה של
User Control (WPF)
5. הוספת רכיב Button ל-Ribbon
6. הקוד של הכפתור, לדוגמא:
WindowsForm form = new WindowsForm();
form.Show();
7. מה-ToolBox, הוספת Control בשם ElementHost מתוך קבוצה בשם WPF Interoperability לתוך ה-Windows Form
8. נפתח Design לבחירת User Control של ה-WPF בפרוייקט.
Read more: Dudi Nissan's Blog
0 comments:
Post a Comment