WPF case (a) analog Windows7 Win+tab switching

Source: Internet
Author: User

A small program that uses WPF to simulate Windows7 win+tab page transitions, using shortcut keys Ctrl+down or ctrl+up to slide the navigation between the various page elements in the sample program, in this case, using the Viewport2dvisual3d host two-dimensional control, Here for the convenience of example, the two-dimensional control simply uses an image, the following is an interface thumbnail, interested friends can download source code: Http://files.cnblogs.com/5460600/Aero.rar

When you build the three-dimensional scene in this example, you use Viewport3d,perspectivecamera,ambientlight, Viewport2dvisual3d,rotatetransform3d, Translatetransform3d,scaletransform3d and so on, the following is a brief description of what these elements play in the three-dimensional scene, respectively.

1.viewport3d:viewport3d is a 2D visualization element that encapsulates the 3D element's container control in a 2D scenario with two important properties

public Camera Camera { get; set; }
public Visual3DCollection Children { get; }

Camera for the 3D scene specifies where the Observer is located

Children represents the collection class of all 3D child controls for Viewport3D

2.PerspectiveCamera represents a perspective projection camera, which is used in this example to pivot projection of a 3D scene

3.AmbientLight lighting to illuminate 3D scene

4.viewport2dvisual3d renders an interactive 2D control in a 3D scenario, using 6 Viewport2dvisual3d elements in this example to render six images respectively

5.rotatetransform3d applies a rotation to the 3D element, which is used in this example to model transformations of the y-axis 45-degree rotation for Viewport2dvisual3d

6.translatetransform3d applies a translation to the 3D element, which is used in the model transformation of Viewport2dvisual3d x,y,z translations

7.scaletransform3d applies a pull-and-flex to the 3D element, which is used in this example to x,y the tensile model transformation of the Viewport2dvisual3d

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.