Welcome to Windows Presentation Foundation (WPF)
Top Tasks :

WPF Team Bloggers

Browse by Tags

All Tags » Windows Presentation Foundation   (RSS)

  • Pages in Silverlight

    Pages as a paradigm likely pre-date the web itself although they have been popularized by document-based markup languages deriving from SGML. Windows Presentation Foundation (WPF) with XAML further codifies Pages as a first-class UI element from its heretofore usage as a logical element. Looking back from Silverlight, this is as good a point in history to start as any. WPF has built-in support for reusable pages in its applications, and the task of navigation between them. It provides the infrastructure for declarative navigation via hyperlinks or programmatic navigation via NavigationService , and a journal that remembers which pages were navigated to or from. For XBAPs on IE7+, WPF supports integration of the journal with the browser's Back and Forward buttons, while elsewhere it displays a substitute navigation bar with this functionality (the limitation is an effect of how the XBAP host plugs into the browser). There is also a building block called PageFunction which introduces a paradigm Read More...
  • WPF 3.5 SP1 feature: StringFormat

    One of the new features in 3.5 SP1 is stringformat. The usage is pretty simple. So following are simple snippets showing its use < TextBox Text = " {Binding Path=Double, StringFormat=F3 } " /> < TextBox Text = " {Binding Path=Double, StringFormat=Amount: {0:C}} " /> < TextBox Text = " {Binding Path=Double, StringFormat=Amount: \{0:C\}} " /> < TextBox > < TextBox.Text > < Binding Path = " Double " StringFormat = " {}{0:C} " /> </ TextBox.Text > </ TextBox > < TextBox > < TextBox.Text > < MultiBinding StringFormat = " {}{0:F2} = {1:D} " > < Binding Path = " Double " /> < Binding Path = " Date " /> </ MultiBinding > </ TextBox.Text > </ TextBox > < TextBox > < TextBox.Text > < Binding Path = " Date " StringFormat = " {}{0:MM/dd/yyyy} " /> </ TextBox.Text > </ TextBox > < ListBox Background = " Beige " ItemStringFormat = " F3 " > < sys:Double > 1.11122 </ Read More...
  • .NET 3.5 SP1 - Try it out today

    Have you tried out .NET 3.5 SP1... If not, try it now. Its got loads of new features for WPF. In fact rather than a service pack, its more of a new release .. So whats new.. improved deployment, new controls (supports creation of datagrid), improved performance, DirectX integration, HLSL shaders, and many new features. For the complete details, take a look at Tims post Links to the executables: Visual Studio 2008 Service Pack 1 (Beta) .NET Framework 3.5 Service Pack 1 (Beta) Visual Studio 2008 Express Editions SP1 (Beta) Visual Studio 2008 Team Foundation Server 2008 SP1 (Beta) Read More...
  • Download Visual Studio 2008 SP1 Beta

    Get it here . Discuss amongst yourselves at the forum . Don't miss Guy Burstein's guided tour . Here's the official word: Visual Studio 2008 With Visual Studio 2008, developers and development organizations have the tools that enable them to be more productive, take advantage of all the latest platform advances on Windows, Office and the Web, and collaborate more effectively throughout the software lifecycle. Visual Studio 2008 offers more than 250 new features and improvements to existing features, providing developers of all skills sets – from the hobbyist to the small development shop to enterprise development organizations – the tools they need to build great applications. Microsoft is committed to helping developers be successful and provides community resources, reference material, software, add-ins, and more to guide construction of Software+Services applications, data-driven solutions, and compelling user experiences. Visual Studio 2008 SP1 beta introduces improvements and new functionality Read More...
  • WPF 3.5 SP1: Don't let the SP moniker fool you

    Yesterday the WPF team shipped some major horsepower features in the vastly understated preview Service Pack to .NET Framework 3.5. It is an exception to the rule for an SP release to have features, and not just bug fixes. In the mold of Windows XP SP2, this SP of .NET Framework 3.5 is chock full of new WPF features. For the first time the .NET Framework has been divided into a Client profile which - intuitively - does not contain server specific libraries such as ASP.NET. This cuts down the size of the .NET Framework to about 25MB (which as Dr. Sneath reminds us is close to Adobe Reader's size) and people like me with a Java background can associate it loosely with the Java SE and Java EE split. In many ways, this is the realization of the Longhorn-era "WinFX" give-or-take a couple assemblies. Given my previous association with the WPF Application Model, I'll begin with a shout out to improvements from and driven by that crew. The Web Browser control in WPF is embodied by the Read More...
  • Drag drop library updated

    The drag drop entry that I had posted has been used by a lot of you guys out there and I have received a lot of suggestions/bugs. I also got a few ready made fixes from you... Thank You :) ... So I finally got down to incorporating all these changes and got the new library up ... One frequent problem was the adorner flickering and this was a result of the adorner being deleted and created ... so thats fixed. There are also some fixes, code moving around and the usual stuff. Hope you find the new library useful :) Library attached Share this post Read More...
  • MindMap app using Hyperbolic tree

    I recently came across a Hyperbolic tree implementation on codeplex using WPF and thought that a nice usage of it could be in writing a mind map creating application.... I tweaked some of the original code and got a tree with editable nodes... Its been laying around for sometime, so I thought it best to put it out there so that you folks can continue its development. Though its not functional in the true sense, it does provide the basic functionality like saving and opening (albeit to the same file)... Currently only the text is serialized... The project (VS 2008) is attached Note that the usage of the Hyperbolic tree and its code is under the Codeplex License terms Share this post Read More...
  • Data Validation in 3.5

    A cool new feature in the Data area in 3.5 is the support for IDataErrorInfo. Let's take a look at the data validation model in 3.5 by starting with a memory refresher of that in 3.0. We end with a section that discusses how to choose between the different approaches. 3.0 Validation Model In 3.0, you would create a custom ValidationRule or use the built-in ExceptionValidationRule this way: < Binding Source ="{ StaticResource data }" Path ="Age" UpdateSourceTrigger ="PropertyChanged"> < Binding.ValidationRules > < ExceptionValidationRule /> </ Binding.ValidationRules > </ Binding > If the ExceptionValidationRule has been associated with the binding and there’s an exception when the binding engine attempts to set the property on the source, then the binding engine creates a ValidationError with the exception and adds it to the Validation.Errors collection of the bound element. You can use the errors in the collection to provide additional visual feedback (in Read More...
  • Testing using WPF UI automation

    One question that often pops up among WPF app developers is UI testing... WPF enables this scenario through a new accessibility framework. Some useful resources from mdeavey's post Overview Using UI Automation UI Spy Stress Test using UI Automation Unit Testing WPF controls with Automation Peers Instantiating a WPF control from an NUnit test Adding UI Automation support to a custom control .NET UI Automation Extension for Automation Testing Share this post Read More...
  • UIElement3D - Input, Focus, and Eventing support in 3D

    One of the great new additions in 3.5 is UIElement3D, which brings input, focus, and eventing to the 3D space. To use UIElement3D, you can use the two new classes that derive from it, ModelUIElement3D and ContainerUlElement3D, or you can create your own custom UIElement3D class. In this blog post , Kurt creates a Sphere class by subclassing UIElement3D, and shows off some new 3D features in the process. Very cool! Read More...
  • 3.5 features: Viewport2DVisual3D

    Viewport2DVisual3D .... this new feature makes things a lot easier in the 3D world.. What this enables is putting interactive 2D on 3D. This makes things like having a textbox in 3D a breeze... < Viewport2DVisual3D x:Name = " vp2d_multiple_children " Geometry = " {StaticResource mesh} " > < Viewport2DVisual3D.Material > < DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial = " True " Brush = " White " /> </ Viewport2DVisual3D.Material > <TextBox /> </ Viewport2DVisual3D > One other thing is mapping 3D points to 2D is so much more easier... Earlier on I had a post on mapping a mouseclick on a 3d model to a 2d coordinate. This involved using some barycentric coordinates and such... Now all you need is call e.GetPosition(relativeTo) in the mouse event handler... tada!!... your coordinates are ready... so using this new stuff i created a simple app for keeping track of your travels. right clicking on the globe puts a tag on the globe. Clicking on the Read More...
  • Annotated FlowDocument Viewer with Comments Pane

    A new WPF 3.5 feature in the Annotations area is the capability to match annotations with the corresponding annotated objects. For example, you can now implement a document viewing application that has a comments pane, where the paragraph that contains the corresponding comment (a text sticky note in this case) is brought into view if you make a selection. A simplified version of such an application may look like this: The list box is bound to the list of annotations. In particular, it uses a converter (IValueConverter) to turn the content of each annotation (64-bit binary data) into text strings. The following is the implementation of the converter: public class AnnotationDataConverter : IValueConverter { public object Convert( object value, Type targetType, object parameter, CultureInfo culture) { // Convert 64 bit binary data into an 8 bit byte array and load // it into a memory buffer byte [] data = System. Convert .FromBase64String(value as string ); using ( MemoryStream buffer = new Read More...
  • 3.5 features: Addins

    In 3.0, we received a number of queries regarding creating plugins. So in 3.5 we got this in .. :) .. Creating an adding would bsically need the use of 3 dlls - System.Addin, System.Addin.Contract, System.Presentation The basic steps to create the addins involves creating a contract, then create the corresponding views and adapsters for both the host and the addin. So in total you will be creating 5 dlls in addition to the app and the actual addin. Even though this looks a bit overwhelming, its pretty simple. http://blogs.msdn.com/clraddins/ gives more information about creating addins. In order to try out this framework, I added the addin support to blogpad with the host being able to set text in the addins... So the app basically has an addin for a calculator (which can be removed) and an ad at the side... You can try out the code that is attached .. FYI, the ad plugin links to an xbap and this line is commented in code.. You might want to point it to a legit xbap to get this plugin working. Read More...
  • 3.5 Features: Enabled hyperlinks in RichTextBox

    hmmm... that was one often requested feature. So to enable hyperlinks in RichTextBox all that is needed is to set the property IsDocumentEnabled on the RichTextBox. Type the following in XamlPadX and you have the hyperlink navigation working. < RichTextBox IsDocumentEnabled = " True " xmlns = ' http://schemas.microsoft.com/winfx/2006/xaml/presentation ' xmlns:x = ' http://schemas.microsoft.com/winfx/2006/xaml ' > < FlowDocument > < Paragraph > < Hyperlink NavigateUri = " http://club.live.com " > Live Games </ Hyperlink > </ Paragraph > </ FlowDocument > </ RichTextBox > A couple of things to notice here: 1> The Navigation is possible only on a Ctrl Click operation 2> There is no tooltip to indicate that navigation is possible. You could add this to the Hyperlink. A simpler alternative is to just subclass the Hyperlink and add the tooltip in the constructor public class MyHyperlink : Hyperlink { public MyHyperlink() { this .ToolTip = Read More...
  • What's New in WPF 3.5 - Going Deeper

    In the last post we gave you the list of new WPF 3.5 features . If you're looking for more details, check out the What's New in WPF 3.5 doc on MSDN . Read More...
More Posts Next page »

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us