All-In-One Code Framework Release 2009-9-17: Brief introduction of new samples

Microsoft All-In-One Code Framework Solution 2009.8.26 updated. Download add:

https://cfx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=32006

If this is the first time you heard about our All-In-One Code Framework project, please refer to our related introduction on the front page:

https://cfx.codeplex.com/

And the following two blogs:

All-In-One Code Framework Solution

微软一站式开发技术框架解决方案 中文说明

CSWin7TaskbarAppID, VBWin7TaskbarAppID, CppWin7TaskbarAppID

Application User Model ID (AppID) is a new introduced feature of Windows 7 taskbar. In windows 7, the taskbar buttons of the applications that share one AppID will be defined in a same group and lapped together. At the same time, AppID is also an important basis for defining application Jump List. CSWin7TaskbarAppID, VBWin7TaskberAppID demonstrate that how to set the AppID of the process level by Windows API Code Pack and modify the specific window AppID. CppWin7TaskbarApp demonstrate that how to set the AppID of the process by C++ and Windows API and modify the specific window AppID. The sample will be compiled successfully only when the windows 7 SDK is installed.

CSWin7TaskbarIcons,VBWin7TaskbarOverlayIcons,CSWin7TaskbarProgressbar, VBWin7TaskbarProgressbar

Applications can set Overlay Icons and Progressbar on its Windows 7 taskbar buttons to show different work status and task schedule. CSWin7TaskbarProgressbar demonstrates how to set schedule and status of Overlay Icons and Progressbar on application taskbar buttons by using Windows API Code Pack.

CSWin7TaskbarThumbnail, VBWin7TaskbarThumbnail

Applications can customize its taskbar Thumbnail preview and Thumbnail toolbar buttons. It is another newly introduced specialty. CSWin7TaskbarThumbnail, VBWin7TaskbarThumbnail demonstrate how to set application taskbar Thumbnail preview and customize Thumbnail toolbar buttons by using Windows API Code Pack.

CSWin7TaskbarJumpList VBWin7TaskbarJumpList

Jump List is also a newly introduced specialty of Windows 7. The user can find the files recently or regularly opened via an application more quickly and easily. Applications can also add user task in the Jump List so that users can open other related applications more easily and customize categories, file projects and file links. CSWin7TaskbarJumpList, VBWin7TaskbarJumpList demonstrate how to set Jump List user task and customize Jump List categories, file items and file links with AppID register application and file handle by using Windows API Code Pack.

XAMLSL3SplashScreen

XAMLSL3SplashScreen demonstrates how to customize the splash screen for Silverlight application. When downloading Silverlight, there will be a default setup menu. You can change it if you want to. Besides, some limits of using SplashScreen are mentioned in the ReadMe.txt.

CSSL3Animation, VBSL3Animation

CSSL3Animation, VBSL3Animation demonstrate how to create animations in the Silverlight. As Silverlight has a plenty of kinds of animations inside by default, it’s impossible to include all of them into one project. Therefore there is only Point and Double data type related animations included in this project.

This project demonstrates:

l How to implement PointAnimation via XAML

l Hoe to implement PointAnimation via Code Behind

l How to make animations for customized properties by using PointAnimation

l How to use Silverlight 3 new feature: Easing

l How to make animations by using key frame

CSSL3DeepZoom, VBSL3DeepZoom

Silverlight deep zoom provide a very high-performance way to show high resolution picture and a collection of large number of pictures. Users firstly download a thumbnail of large pictures (collection), which has very low resolution. The part of picture of high resolution will be downloaded to the client side, as they enlarge a part of a picture. Besides, you can also customize the deep zoom in your own application so that the deep zoom scene can be perfectly compromised into your application. This sample demonstrates some of the familiar ways of customization of deep zoom.

l Create deep zoom scene by Deep zoom composer

l Download and parse metadata

l Create a non-bitmap UIElment, and let it move and zoom with MultiScaleImage

l Move a sub image in a collection scene

l Dynamically create a deep zoom scene in the code by DeepZoomTools.dll

CSSL3WriteableBitmap

WriteableBitmap is a new feature of Silverlight 3, with which you can work on any pixel in a bitmap. You can think of many scenes, however, considering the security (for example, Silverlight won’t permit unsafe code with pointer), and compared with same desktop applications, you may need to write more code. This sample includes 3 small examples, which shows some familiar scenes using WriteableBitmap:

l Gun shoot. You can choose two different size pictures. This sample will zoom them into a same resolution and let one picture cover another. When you click “shoot”, a shoot mark will appear and you will shoot through the cover picture and see the under one. This sample demonstrates how to zoom pictures with different resolution to a same resolution and how to change a single pixel.

l Fill color. This sample implement a very familiar scene in graphic software: paint pot, which is used to fill a area with a same color. It demonstrates how to use familiar graphic algorithm in Silverlight WriteableBitmap and also simulate the way CLR transfer the stack to resolve the problem of stack overflow because of the over-recursion.

   

l Screen shot. This sample demonstrates another new feature of WriteableBitmap: create screen shot, and save it as a bitmap. It also shows the limit of this new feature.

You need to have some knowledge of graphic to find more potential of WriteableBitmap. For example, you need to know that how bitmap is saved in the memory, the basic knowledge of color and pixel etc. You should learn about displacement operation for high efficiency of working.

CSSL3CustomControl

CSSL3CustomControl is a Silverlight library project. This project shows how to create customized controls by implement a HighLightTextBlock which can highlight the text. And it demonstrates how to change the appearance of the HighLightTextBlock with style through related project XAMLSL3StyleControlTemplate.

CSADONETDataServiceSL3Client, VBADONETDataServiceSL3Client

The CSADONETDataServiceSL3Client example demonstrates how to access ADO.NET Data Services in Silverlight. It creates three proxies that maps three different services at server side, which respectively uses ADO.NET Entity Data Model, Linq to SQL Data Classes, and non-relational in-memory data as data source.

This sample demonstrates how to select, update, delete and insert data via REST calls to ADO.NET Data Services. These REST messages will be automatically created by the proxy class. We can also create/send/receive messages on our own but using proxy is much easier.

CSASPNETMVCFileDownload

This is the first sample of ASP.NET MVC. In October we will have more ASP.NET MVC sample come out. CSASPNETMVCFileDownload demonstrates a file download sample, which includes register customized URL route and customized ActionResult.

CSASPNETGridView, CSASPNETDataPager, CSASPNETMenu

These three samples each demonstrates ASP.NET GridView, DataPager and the use of Menu control.

VBASPNETMasterPage

This sample demonstrates the usage of ASP.NET master page. You can create an accordant layout for the application pages by using ASP.NET master page. A single master page can be regard as the appearance and standard behavior of all the pages of an application. Then you can create each content page with the content you want to show. When the user asks for the content page, these content pages will merge with the master page and the layout and the content will be output together.

CSASPNETOutputCache

CSASPNETOutputCache demonstrates ASP.NET Output Cache to enhance the page response speed.

VBListFilesInDirectory

This is a VB.NET version of CSListFilesInDirectory samples. Its root is from a frequently asked question: Directory.GetFiles method in .NET BCL can enumerate files from a folder, but it has a deadly shortcoming. Directory.GetFiles will not return until all the files are enumerated. If there are a lot of files, or if the folder is a network folder and the access speed is very slow, the Directory.GetFiles will hang there. You may need to wait for its return synchronously. A ideal solution is: retrieve a file, when it is enumerated, but not wait for all. CSListFilesInDirectory and VBListFilesInDirectory demonstrated how to do that.

ATLShellExtIconHandler, ATLShellExtIconOverlayHandler

This two Windows Shell Extension samples each demonstrates the development of Icon Handler and Icon Overlay Handler.

CSVSPackage

VSPackages are software modules that make up and extend the Visual Studio integrated development environment (IDE) by providing UI elements, services, projects, editors, and designers. VSPackages are the principal architectural unit of Visual Studio, and are the unit of deployment, licensing, and security also. Visual Studio itself is written mostly as a collection of VSPackages. This sample demonstrate how to use the the Visual Studio Integration Package Wizard to create a simple VSPackage.

CSVSPackageState

VSX: VS package state persistence sample

 

The Visual Studio package state sample demonstrates the state persisting for application options and show object states in properties window.

 

The sample doesn't include the state management for solution and project, which will be included in project package sample.

 

*Tools/Options Page*

Selecting Options on the Tools menu opens the Options dialog box. The options in this dialog box are collectively referred to as Tools/Options pages. The tree control in the navigation pane includes option categories, and each category has option pages. When you select a page, its options appear

in the right pane. These pages let you change the values of the options that determine the state of a VSPackage.

 

The DialogPage class implements IProfileManager, which provides persistence for both options pages and user settings. The default implementations of the LoadSettingsFromStorage and SaveSettingsToStorage methods persist property changes into a user's section of the registry

if the property can be converted to and from a string.

 

 

  

*Property Window*

In this sample, we use ToolWindow to demostrate property window.

 

When you select an object in Visual Studio, the public properties of that object appear in the Properties window. To select an object programmatically, you add the object to a list of selectable and

selected objects in a selection container. You use the STrackSelection service to notify Visual Studio of the selection.

 

 

 

References:

 

VSPackage State

https://msdn.microsoft.com/en-us/library/bb165693.aspx

 

Support for Options Pages

https://msdn.microsoft.com/en-us/library/bb166553.aspx

 

Support for the Property Browser

https://msdn.microsoft.com/en-us/library/bb165050.aspx

At last, if you have any suggestion or feedbacks on our new version, please feel free to give us here. Thanks!