Lập trình .net 4.0 và visual studio 2010 part 3

Mở dự án và lưu ý làm thế nào XAML là một tiêu chuẩn trang với một số điều khiển Visual Studio-cụ thể để hiển thị các hạng mục như dự án gần đây đã mở. Thực hiện một sự sửa đổi đơn giản, chẳng hạn như thay đổi một số nội dung văn bản. Lưu tập tin với một tên file mới, chẳng hạn như , trong cùng thư mục. | CHAPTER 2 VISUAL STUDIO IDE AND MEF 1. Open the project and note how is a standard XAML page with some Visual Studio-specific controls to display items such as recently opened projects. 2. Perform a simple modification such as altering some of the text content. 3. Save the file with a new file name such as in the same directory. Before you can use your new start page you have to select it in Visual Studio options. Go into Tools Options then select the Startup node. Select the new custom start page from the Custom Start Page drop-down menu. Close Visual Studio and reopen it. Your new start page should now appear the next time Visual Studio is loaded. T4 Text Template Transformation Toolkit Files A T4 template is a code-generation language that has been around since VS2005. You should be aware of them as they are used in areas such as Entity Framework and MVC and can be useful for your own development. To see T4 templates in action create a file with the extension .tt add some text content save the file and note how Visual Studio will generate a code file from the template. You can apply complex logic using T4 templating language to change the output that is generated depending on various conditions. T4 templates in VS2010 are compiled when they are saved preprocessed . This means that they are another type that can be instantiated. Scott Hanselman has some great and information on this area so please refer to the following article blog T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudio . T4 templates don t have Intellisense so your best bet is to download the Tangible T4 plugin http en-us 60297607-5fd4-4da4-97e1-3715e90c1a23. For more see http DslTools Wiki title What 27s 20new http 2009 10 30 t4-preprocessed-text-templates-in-visual-studio-2010 VS2010 Premium and .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.