Rss Feed
Tweeter button
Facebook button
Technorati button
Reddit button
Myspace button
Linkedin button
Webonews button
Delicious button
Digg button
Flickr button
Stumbleupon button
Newsvine button
logo

What’s New in WPF 4 in .NET 4.0/VS2010

logo

3 New Controls

3 much needed controls that if you’re a Windows Forms user, you’d be wondering why WPF didn’t already have these.

  • Long awaited DataGrid control (if you’re in 3.5 SP1 check out WPFToolkit as an alternative)
  • Calender control
  • DatePicker Control

Visual State Manager

Another new feature supporting the WPF-Silverlight continuum is the VisualStateManager, which introduces a simple new way to apply visual states to controls. This mechanism provides a way to easily customize both the look and feel of a control by providing the means to map the control logic to its respective start and end visual states.

VSM is very flexible in that it automatically generates the transition animations in between the respective states, so the control author spends less time writing code and more time on the visual states that are defined in a control template. That means VSM can give a control author the ability to easily interchange the look and feel of controls, and VSM gives the control author a way to easily interchange how a control visually responds to user interaction.  This is fully supported with Expression Blend.

Touch and Manipulation

Elements in WPF now accept touch input. The UIElement, and UIElement3D, and ContentElement classes expose events that occur when a user touches an element on a touch-enabled screen. In addition to the touch events, the UIElement supports manipulation. A manipulation is interpreted to scale, rotate, or translate theUIElement. For example, a photo viewing application might allow users to move, zoom, resize, and rotate a photo by touching the computer screen over the photo.

For more information about touch, see Walkthrough: Creating Your First Touch Application and Input Overview.

Graphics and Animation

  • Layout Rounding

    When an object edge falls in the middle of a pixel device, the DPI-independent graphics system can create rendering artifacts, such as blurry or semi-transparent edges. Previous versions of WPF included pixel snapping to help handle this case. Silverlight 2 introduced layout rounding, which is another way to move elements so that edges fall on whole pixel boundaries. WPF now supports layout rounding with the UseLayoutRounding attached property onFrameworkElement.

  • Cached Composition

    By using the new BitmapCache and BitmapCacheBrush classes, you can cache a complex part of the visual tree as a bitmap and greatly improve rendering time. The bitmap remains responsive to user input, such as mouse clicks, and you can paint it onto other elements just like any brush.

  • Pixel Shader 3 Support

    WPF 4 builds on top of the ShaderEffect support introduced in WPF 3.5 SP1 by allowing applications to now write effects by using Pixel Shader (PS) version 3.0. The PS 3.0 shader model is more sophisticated than PS 2.0, which allows for even more effects on supported hardware.

  • Easing Functions
    You can enhance animations with easing functions, which give you additional control over the behavior of animations. For example, you can apply anElasticEase to an animation to give the animation a springy behavior. For more information, see the easing types in the System.Windows.Media.Animationnamespace.

Text

  • New Text Rendering Stack

    The WPF text rendering stack has been completely replaced. This change brings improvements to text rendering configurability, clarity, and support for international languages. The new text stack now supports explicitly selecting aliased, grayscale, or ClearType rendering modes. The text stack now supports display-optimized character layout, to produce text with sharpness comparable to Win32/GDI text. The new text stack allows optimizing text hinting and snapping for either animated or static text. The new text stack also supports fonts with embedded bitmaps to be substituted for smaller font sizes, allowing many East Asian fonts to render with sharpness comparable to Win32/GDI text.

  • Selection and Caret Customization

    You can now specify the brush that paints the selection and caret for input and reading controls, such as TextBox RichTextBox, and FlowDocumentReader. There are two new properties on TextBoxBase:

    • SelectionBrush allows you to create a brush for highlighting selected text.
    • CaretBrush allows you to change the brush that paints the cursor.

Binding

XAML Browser Applications

Two features have been added to XAML browser applications (XBAPs).

  • HTML-XBAP Script Interop

    You can now communicate with the Web page containing the XBAP when the application is hosted in a HTML frame. The XBAP can get deep access to the HTML DOM and can handle DOM events. For more information seeBrowserInteropHelper.HostScript.

  • Full-Trust XBAP Deployment

    If your XBAP requires full trust, the user will now automatically receive the standard ClickOnce elevation prompt when they install the application from the intranet or one of their browser’s trusted sites.

For more information on both these features, see WPF XAML Browser Applications Overview.

WPF and Windows

The Windows 7 taskbar provides enhanced functionality that enables you to use the taskbar button to communicate status to a user and expose common tasks. New types in the System.Windows.Shell namespace provide managed wrappers for functionality in the Windows 7 taskbar and manages the data passed to the Windows shell. For example, the JumpList type allows you to work with Jump Lists and the TaskbarItemInfo type allows you to work with taskbar thumbnails.

WPF dialog boxes on Windows 7 and Windows Vista now support the look and feel of the Windows 7 and Windows Vista style, which includes custom places. For more information, see the FileDialogCustomPlace class.

WPF Designer

In Visual Studio 2010, various designer improvements have been made to help create WPF or Silverlight applications.

  • Improved Support for Silverlight

    In Visual Studio 2008, you could install the Silverlight Tools to create Silverlight applications in Visual Studio. However, the designer support for Silverlight projects was limited. In Visual Studio 2010, the designer support for Silverlight and WPF projects are now the same. For example, in Silverlight projects you can now select and position items with the mouse on the design surface.

  • Support for Multiple Platform Versions

    In Visual Studio 2008, control design times were able to target only the latest WPF platform version. In Visual Studio 2010, this support is extended across multiple platforms, including design-time support for WPF 3.5, WPF 4, Silverlight 3, Silverlight 4, and future platform releases. As the same extensibility API exists for all these platforms, control design-time authors can easily write one experience and share it across the control runtimes for each platform.

  • Visual Databinding

    The new data binding builder enables visual construction and editing of bindings without typing XAML.

  • Auto Layout

    Layout improvements include a more intuitive Grid designer and better support for automatically sizing user controls.

  • Improved Property Editing

    The Properties window now enables visually creating and editing Brush resources.

For more information, see WPF Designer.

Sources:

http://msdn.microsoft.com/en-us/library/bb613588(VS.100).aspx
http://weblogs.asp.net/scottgu/archive/2009/10/26/wpf-4-vs-2010-and-net-4-0-series.aspx

22 Responses to “What’s New in WPF 4 in .NET 4.0/VS2010”

  1. Norene Siren says:

    hmm interstinggg haha

  2. ARTHUR says:

    PillSpot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Pillspot.org. Vitamins@buy.online” rel=”nofollow”>.…

    Categories: Anti-allergic/Asthma.Weight Loss.Mens Health.Vitamins/Herbal Supplements.Mental HealthPain Relief.Antidepressants.Antiviral.Blood Pressure/Heart.Womens Health.Stomach.Antibiotics.Skin Care.Stop SmokingAnxiety/Sleep Aid.Eye Care.Antidia…

  3. JOHNNY says:


    MedicamentSpot.com. Canadian Health&Care.Best quality drugs.No prescription online pharmacy.Special Internet Prices. High quality drugs. Buy pills online

    Buy:Nexium.Zyban.Prednisolone.Petcam (Metacam) Oral Suspension.Valtrex.Zovirax.Retin-A.Accutane.Mega Hoodia.Lumigan.Actos.Synthroid.Human Growth Hormone.100% Pure Okinawan Coral Calcium.Prevacid.Arimidex….

  4. State says:

    Traffic http://BABYCLOTHESNUT.INFO/tag/New York State Traffic Law Re : York…

    Law…

  5. Sheet http://APTAUTOPARTS.INFO/tag/Dietary Supplement Fact Sheet : fact vitamin/…

    fact vitamin/…

  6. ROLAND says:


    CheapTabletsOnline.Com. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. No prescription drugs. Buy pills online

    Buy:Female Cialis.Wellbutrin SR.Lipothin.Seroquel.Aricept.Amoxicillin.SleepWell.Prozac.Benicar.Nymphomax.Zetia.Advair.Cozaar.Lasix.Zocor.Buspar.Female Pink Viagra.Lipitor.Ventolin.Acomplia….

  7. ALLAN says:


    NEW FASHION store. Original designers collection at low prices!!! 20 % TO 70 % OFF. END OF SEASON SALE!!!

    BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…

  8. GUY says:

    symbicort vs advair

    Buyno prescription…

  9. DARRELL says:

    actonel@adverse.reactions” rel=”nofollow”>…

    Buygeneric meds…

  10. SERGIO says:

    allopurinol@and.coumadin” rel=”nofollow”>…

    Buygeneric drugs…

  11. JEROME says:

    ashwagandha@supplement.now” rel=”nofollow”>…

    Buygeneric meds…

  12. SIDNEY says:

    atarax@and.hives” rel=”nofollow”>.

    Buygeneric drugs…

  13. CECIL says:

    Chantix@official.site” rel=”nofollow”>.

    Buydrugs without prescription…

  14. ANDREW says:

    Risperdal@official.site” rel=”nofollow”>..

    Buynow it…

Leave a Reply

You must be logged in to post a comment.

logo
logo
Powered by Wordpress