TAILIEUCHUNG - Pro WPF in C# 2010 phần 10

Đây là một cuốn sách tuyệt vời viết về WPF. Nó bao gồm tất cả các chủ đề quan trọng, bao gồm cả lập trình 3D. Tất cả các mã lệnh và cú pháp được tô sáng. Có phần nâng cao phục vụ cho các lập trình viên cao cấp. Cuốn sách được xuất bản năm 2007, bởi tác giả Adam Nathan | CHAPTER 28 DOCUMENTS In the previous example the annotation is created without any author information. If you plan to have multiple users annotating the same document you ll almost certainly want to store some identifying information. Just pass a string that identifies the author as a parameter to the command as shown here Button Command annot CommandParameter StaticResource AuthorName Text Note Button This markup assumes the author name is set as a resource sys String x Key AuthorName Anonymous sys String This allows you to set the author name when the window first loads at the same time as you initialize the annotation service. You can use a name that the user supplies which you ll probably want to store in a user-specific .config file as an application setting. Alternatively you can use the following code to grab the current user s Windows user account name with the help of the class WindowsIdentity identity AuthorName To create the window shown in Figure 28-17 you ll also want to create buttons that use the CreateInkStickyNoteCommand to create a note window that accepts hand-drawn ink content and DeleteStickyNotesCommand to remove previously created sticky notes Button Command annot CommandParameter StaticResource AuthorName Ink Note Button Button Command annot Delete Note s Button The DeleteStickyNotesCommand removes all the sticky notes in the currently selected text. Even if you don t provide this command the user can still remove annotations using the Edit menu in the note window unless you ve given the note window a different control template that doesn t include this feature . The final detail is to create the buttons that allow you to apply highlighting. To add a highlight you use the CreateHighlightCommand and you pass the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.