Đang chuẩn bị liên kết để tải về tài liệu:
Pro WPF in C# 2010 phần 9

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Một cuốn sách nổi tiếng khi viết về lập trình WPF 4 trên ngôn ngữ C#. Nếu thực sự bạn làm được những gì trong cuốn sách này chỉ ra. Bạn thực sự đã đạt đẳng cấp pro trong lập trình WPF. Cuốn sách được Apress xuất bản tháng 3 năm 2010. Ngôn ngữ tiếng Anh. | CHAPTER 24 PAGES AND NAVIGATION The obvious disadvantage with this code is that it relies on exception handling to control normal program flow which is discouraged both because it leads to unclear code and because it adds overhead . An alternative would be to simply attempt to perform the operation such as writing to a file and then catch any resulting SecurityException. However this approach makes it more likely that you ll run into a problem halfway through a task when recovery or cleanup may be more difficult. Isolated Storage In many cases you may be able to fall back on less powerful functionality if a given permission isn t available. For example although code running in the Internet zone isn t allowed to write to arbitrary locations on the hard drive it is able to use isolated storage. Isolated storage provides a virtual file system that lets you write data to a small user-specific and application-specific slot of space. The actual location on the hard drive is obfuscated so there s no way to know exactly where the data will be written beforehand and the total space available is typically 1 MB. A typical location on a Windows 7 or Windows Vista computer is a path in the form c Users UserName AppData Local IsolatedStorage GuidIdentifier . Data in one user s isolated store is restricted from all other nonadministrative users. Note Isolated storage is the .NET equivalent of persistent cookies in an ordinary web page. It allows small bits of information to be stored in a dedicated location that has specific controls in place to prevent malicious attacks such as code that attempts to fill the hard drive or replace a system file . Isolated storage is covered in detail in the .NET reference. However it s quite easy to use because it exposes the same stream-based model as ordinary file access. You simply use the types in the System.IO.IsolatedStorage namespace. Typically you ll begin by calling the IsolatedStorageFile.GetUserStoreForApplicationO method to get a .