Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What Business Benefit does WPF provide?
Message
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Miscellaneous
Thread ID:
01307283
Message ID:
01307439
Views:
13
>>Has this ever been a problem? I dont think I have ever seen a business application that "Needed " a Vector Graphic (no business need here save it for the video games)
>----------------------------------
>The vector grapics really come in handy with resize of your controls.

Strangely that was one of my main reasons for going WPF. A lot of my users are getting older and having trouble with the smaller point sizes. I wanted them to be able to scale the forms so that they could see them easier. I also wanted to do more dynamic work with my layout.

This is all it took to implement mouse wheel ZOOM levels for all my controls:
private double zoom = 1;
private void cdsDockContent_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
  {
  base.OnPreviewMouseWheel(e);
  if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
        {
        zoom += (e.Delta * .001);
        if (zoom < .5)
          zoom = .5;
        else if (zoom > 3)
          zoom = 3;
        LayoutTransform = new ScaleTransform(zoom, zoom);
        e.Handled = true;
        }
      }
Put it in your base window class and all your forms become zoomable. And with WPFs layout features and vector rendering they still look good.

The similarity between WPF and Silverlight (code reuse) and the promise of some cross platform capabilities were also big pluses.

Once you get the hang of it. Laying out the interface seems faster, the big learning curve is all the new concepts like templates, routed events and dependency properties. I'm still struggling with those, but I'm liking it so far.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform