WPF Flocking and Evasion Demo

Posted in  | .  

 Came across this cool XBAP by Denis Dolfus:

FlockingXBAP

WPF Overview

Posted in  |  |  | .  

nibbles: snack tutorials for hungry designers

Posted in  |  |  | .  

Just came across this new WPF\Silverlight site - nibbles: snack tutorials for hungry designers.
As described on the site:

As the name suggests, nibbles are short tutorials that teach you one specific feature at a time. Later, you can combine all the things you have learned to develop a complex project by yourself.

There are already some tutorials about Expression Blend and Silverlight and content on Blend with WPF is expected soon. You can watch for new releases on the nibbles blog.


Acropolis uses XAML to define business logic components

Posted in  |  | .  
A lot of developers are mistaking XAML to be an exclusively WPF technology. The truth is, that as it's name (Extensible Application Markup Language) suggests, it can be used to represent all kinds of application mechanisms, not just the UI.
David Hill has written a post with a brief explanation as to why Acropolis uses XAML instead of code to represent its business logic component. Check the "Why XAML?" section under this post.

Using a declarative approach like this, though, provides a number of benefits:

  • Using XAML gives you a very concise way to express the structural aspects of your component - not just the external ‘class interface', but how it is structured internally. For example, it allows you to cleanly define how any child components or services that your component uses are configured or interact with each other.
  • It allows you to concentrate more on the code that defines the actual implementation of your component. In other words, we want to make it so that 99%+ of the code that you do write is the actual code that will solve your business problem and not plumbing or glue code.
  • It is much easier for us (or you) to build visual designers or other tools (including test tools) for your component since its structure is more easily ‘machine-parsable'. It also allows for a looser coupling between the application model and the tools allowing each of them to evolve more quickly.

Since there is very little documentation I could find on the subject, I wonder how complicated is to create my own application markup and a designer for Visual Studio...
Anyone has any good pointers on this?


Build an Outlook 2007 UI Clone using WPF

Posted in  |  |  |  | .  
Two engineers from Microsoft Switzerland, Ronnie Saurenmann and Ruihua Jin, have put together this 90-page hands-on lab that takes you through the process of building a business application that has the same UI as Outlook 2007 using Expression Blend.
You can check out the xbap, read the hands-on-lab manual, or look at the source.

More details on this here:


Great WPF Applications

Posted in  |  |  | .  

Tim Sneath is doing a series about great WPF applications. Check out his blog...




WPF/E Pad (Plus Some Other Apps)

Posted in  |  |  | .  

Just came across Mike Harsh's blog where he published some cool WPF/E applications.
One of which is the WPF/E Pad which is a WPF/E based XAML editor with split view where the XAML on the bottom view is rendered on the top view.

WPF/E Pad Screenshot


Fun Controls Bag - 9 new WPF Controls on CodePlex

Posted in  |  |  | .  

Thomas Lebrun has posted 9 WPF controls up on codeplex:
CheckedComboBox, CheckedListBox, CollapsiblePanel, ComboBoxFontSelection, ConfirmButton, FilteredTextBox, BindableRunControl, RichTextBoxWithToolBar, PresenceControl.

Technorati : , , , ,


Looking for a WPF Ribbon Control?

Posted in  |  |  | .  

Dev Partner Ribbon Screenshot #1Denis over at DevComponents finally broke the silence about the WPF-Ribbon. There is a private beta which you can sign up for...

"Wpf-Ribbon™ is the fully complaint Office 2007 style Ribbon control developed from ground-up for Windows Presentation Foundation. Wpf-Ribbon™ is a professional quality component for professional WPF applications. "

Partial list of Wpf-Ribbon™ features:

  • Unlimited color schemes
  • Automatic intelligent Ribbon resizing
  • Application menu support
  • Contextual groups support
  • Office 2007 controls included, like ComboBox, Check-box etc.
  • KeyTips support
  • Predefined color schemes Blue, Silver, Black
  • Office 2007 style Galleries support
  • Ribbon popup menu support
  • Quick Access Toolbar (QAT) with customization
  • Keyboard navigation

A list of some other tools and controls for WPF can be found on Mike Swanson's blog.

Technorati : , , , ,


3D Interaction in WPF

Posted in  |  |  | .  

This is awsom!

The guys at WPF3D released an open source library (availble on codeplex) that allows you to take regular 2D control and
move them to 3D space.

Here is a taste of what's possible:

2D_on_3D_thumb.png

Technorati : , , , , , ,


.NET Framework 3.0 Is Out the Door!

Posted in  |  |  | .  

The .NET Framework 3.0 has officially been released! You can download the .NET Framework 3.0 components here:

The Readme for the released version of the .NET Framework 3.0 is available here.
If you have a previous CTP installed, check out the uninstall instructions.

Technorati : , ,
Del.icio.us : , ,
Ice Rocket : , ,


Some More Thoughts About the NY Times Reader

Posted in  |  |  | .  

si.jpgEven though the NY Times Reader application is very cool, I think there are better ways to reach to the hearts of the people and sell them this new WPF technology.
After all, I think most downloads for this app are done by techies like me, who may spend few hours playing with it just to see the capabilities and then move to something else. Maybe New Yorkers may find this a bit more interesting but still, the evangelists at Microsoft could have thought of a better application to spread the word.

Sports Illustrated Reader for example. now that would be a true killer application!!!
It appeals to the vast majority of the world, not just techies and New Yorkers and even though it requires installing beta software (.NET Framework 3.0 RC1, the reader itself) I'm sure there won't be any complaints...

Now thats the way to approach the grassroots :-)


Technorati : , , ,
Del.icio.us : , , ,
Ice Rocket : , , ,


Overview of .NET 3.0 Through Demos

Posted in  |  |  |  | .  

.NET 3.0 Components DiagramI recently had to give an overview presentation of Microsoft's new .NET 3.0 technologies at work.
Since I don't like writing or giving long PowerPoint presentations I decided to cut down as much as possible on slides and talk my way through a bunch of demo applications demonstrating the various aspects of .NET 3.0.
So, here's a bunch of good demos to demonstrate .NET 3.0 capabilities:

Integration Between Developer and Designer

With .NET 3.0, Microsoft will provide Visual Studio, aimed for developers, and the Expression Suite, aimed to designers.
Both packages are designed to work together so that developer and designer could work together, on the same project and files. Finally the barrier between the designer, who works with Photoshop and produces graphic files, and developer who works in Visual Studio and produces code is broken.

To demonstrate this I used the XamlPad to show how both developer and designer would work on the design and code of the same window which our case contains a single ListBox.
The developer, simply defines a page containing a ListBox control and some values so that he can start working on some codebehind logic:

WinFX_SimpleListBox.png

 <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006"> 
    <Grid x:Name="DocumentRoot">
           <ListBox Name="list" Width="200" Height="400">
            <ListBoxItem>Item number one</ListBoxItem>
            <ListBoxItem>Item number two</ListBoxItem>
            <ListBoxItem>Item number three</ListBoxItem>
            <ListBoxItem>Item number four</ListBoxItem>
            <ListBoxItem>Item number five</ListBoxItem>
            <ListBoxItem>Item number six</ListBoxItem>
            <ListBoxItem>Item number seven</ListBoxItem>
            <ListBoxItem>Item number eight</ListBoxItem>
            <ListBoxItem>Item number nine</ListBoxItem>
            <ListBoxItem>Item number ten</ListBoxItem>
            <ListBoxItem>Item number eleven</ListBoxItem>
            <ListBoxItem>Item number twelve</ListBoxItem>
            <ListBoxItem>Item number thirteen</ListBoxItem>
            <ListBoxItem>Item number fourteen</ListBoxItem>
        </ListBox>
    </Grid>
 </Page>

At this point, the designer can take control and actually make the ListBox look cool using styling and templates:

WinFX_StyledListBox.png

     <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006"> 
    <Grid  mc:Ignorable="d" x:Name="DocumentRoot">
        <Grid.Resources>
            <Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
            <Setter Property="Cursor" Value="Hand" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border>
                                <ScrollViewer>
                                    <ItemsPresenter />
                                </ScrollViewer>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            
            <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
                <Setter Property="Foreground" Value="#FFFFFF" />
                <Setter Property="FontFamily" Value="Verdana" />
                <Setter Property="FontSize" Value="11" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ListBoxItem}">
                            <Canvas Width="Auto" Height="25">
                                <Rectangle Name="filler" Canvas.Top="0" Canvas.Left="0" Width="200" Height="25">
                                    <Rectangle.Fill>
                                        <SolidColorBrush x:Name="fillb" Color="#333333" />
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Path d:LastTangent="0,0" Stroke="{x:Null}" Fill="#FF6E00" HorizontalAlignment="Right" VerticalAlignment="Top" Width="7" Height="7" Canvas.Left="15" Opacity="0" Canvas.Top="6" x:Name="Path" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Data="M601.11544,190.39485 L590.06202,213.0964 613,213">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <RotateTransform Angle="90"/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <ContentPresenter Name="con" Canvas.Top="2" Canvas.Left="10" />
                            </Canvas>
                             <ControlTemplate.Triggers>
                                        <EventTrigger RoutedEvent="Button.MouseEnter">
                                          <BeginStoryboard>
                                                <Storyboard>
                                                      <ColorAnimation Storyboard.TargetName="fillb" Storyboard.TargetProperty="(SolidColorBrush.Color)" From="#333333" To="#111111" Duration="0:0:0.1" />    
                                                      <DoubleAnimation Storyboard.TargetName="con" Storyboard.TargetProperty="(Canvas.Left)" From="10" To="30" Duration="0:0:0.1" />
                                                      <DoubleAnimation Storyboard.TargetName="Path" Storyboard.TargetProperty="(Path.Opacity)" From="0" To="1" Duration="0:0:0.1" />
                                                      <DoubleAnimation Storyboard.TargetName="Path" Storyboard.TargetProperty="(Canvas.Left)" From="15" To="10" Duration="0:0:0.2" />
                                                </Storyboard>
                                          </BeginStoryboard>
                                       </EventTrigger>
                                        <EventTrigger RoutedEvent="Button.MouseLeave">
                                          <BeginStoryboard>
                                                <Storyboard>
                                                      <ColorAnimation Storyboard.TargetName="fillb" Storyboard.TargetProperty="(SolidColorBrush.Color)" From="#111111" To="#333333" Duration="0:0:0.8" />
                                                      <DoubleAnimation Storyboard.TargetName="con" Storyboard.TargetProperty="(Canvas.Left)" From="30" To="10" Duration="0:0:0.3" />
                                                      <DoubleAnimation Storyboard.TargetName="Path" Storyboard.TargetProperty="(Path.Opacity)" From="1" To="0" Duration="0:0:0.1" />
                                                      <DoubleAnimation Storyboard.TargetName="Path" Storyboard.TargetProperty="(Canvas.Left)" From="10" To="15" Duration="0:0:0.1" />
                                                </Storyboard>
                                          </BeginStoryboard>
                                        </EventTrigger>
                                    </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            
        </Grid.Resources>
     
     
        
        <ListBox Name="list" Width="200" Height="400">
            <ListBoxItem>Item number one</ListBoxItem>
            <ListBoxItem>Item number two</ListBoxItem>
            <ListBoxItem>Item number three</ListBoxItem>
            <ListBoxItem>Item number four</ListBoxItem>
            <ListBoxItem>Item number five</ListBoxItem>
            <ListBoxItem>Item number six</ListBoxItem>
            <ListBoxItem>Item number seven</ListBoxItem>
            <ListBoxItem>Item number eight</ListBoxItem>
            <ListBoxItem>Item number nine</ListBoxItem>
            <ListBoxItem>Item number ten</ListBoxItem>
            <ListBoxItem>Item number eleven</ListBoxItem>
            <ListBoxItem>Item number twelve</ListBoxItem>
            <ListBoxItem>Item number thirteen</ListBoxItem>
            <ListBoxItem>Item number fourteen</ListBoxItem>
        </ListBox>
    </Grid>
    </Page>


Note that I took this slicky ListBox style sample from theWPFblog.

NY Times Reader

WinFX NY Times Reader ScreenshotDubbed as the "Killer Application" for WPF, this application demonstrates WP F's power in layouts and documents.
Using WPF, this application imitates the exact layout (which is NY Times's trademark) of the NY Times paper without being static like the web site. Content can adjust itself to resizing and allows you to easily browse through all the paper's sections.
There's even a section where you can slideshow through all the photos that appear on the paper.
The NY Times Reader is currently available as beta and you can register (free) and download it yourself to check it out.

WPF Sudoku

WinFX_Sudoku.pngThis application looks great and shows how you can use the Windows Communication Foundation, the Windows Workflow Foundation and the Windows Presentation Foundation to build a P2P version of Sudoku. The game generation logic defined using WF, the user experience is implemented using WPF which also allows it to be deployed both as a windows application or as an XBAP and the P2P servers which allows player to race each other is built using WCF.

The Sudoku sample is availble here.

WinFX_Woodgrove.jpgWoodgrove Financial Application

This applications demonstrate the power of XBAP in bringing rich user experience applications to the web.
It's a financial application that displays complex 3D graphs and running directly from the browser.
This demo is availble here.

Microsoft Max

Microsoft codename "Max" is another application from Microsoft showing slick WPF UI and animations.


New .NET 3.0 Training Material

Posted in  |  |  | .  

Setting Window.Icon Property Value From Codebehind

Posted in  |  |  | .  

I really got annoyed today by the fact that I could not perform a simple task of setting the Icon property of my WPF window
from codebehind. I tried using the following code:

BitmapImagebmp = newBitmapImage(newUri(@"pack://application:,,/Resources/OptionsDialog.ico"));
this.Icon = bmp;

This kept throwing an exception saying "System.InvalidOperationException: ImageSource for Icon property must be an icon file."
Well, OptionsDialog.ico is an icon, and I couldn't find anywhere in the documentation (or in Google) a different way of setting an ImageSource property.
Luckily, it turns out the MSDN WPF forum is a good place to ask questions and it didn't take long to get an answer (from Ashish Shetty) on how this should be done:

IconBitmapDecoder ibd = new IconBitmapDecoder( 
new Uri(@"pack://application:,,/Resources/OptionsDialog.ico", UriKind.RelativeOrAbsolute), 
BitmapCreateOptions.None, 
BitmapCacheOption.Default); 
this.Icon = ibd.Frames[0]; 

This snippet should be in the Window.Icon property documentation....

Technorati : , ,
Del.icio.us : , ,
Ice Rocket : , ,


Another "Orcas" CTP

Posted in  |  |  | .  

Thats the 2nd "Orcas" CTP this month. This one, dubbed "The September CTP" is only available as a Virtual PC Image and seems to integrate a lot more feature rather than just delivering "Cider" as they have been doing so far.
You can download it from here.

The highlights of this CTP include:

  • Improvements on the widely acclaimed Visual Studio 2005 product set
  • Significant investments in improving product quality
  • LINQ to Objects API
    • LINQ to Objects API supports queries over any .NET collection, such as arrays and Generic Lists. This API is defined in the System.Query namespaces inside System.Core.dll. Click here for more details about LINQ.
  • Partial C# 3.0 Language Support: This CTP implements some of the new language features of C# 3.0
    • Local variable type interface
    • Lambda expressions
    • Object initializers
  • Partial C# 3.0 IDE Support: In addition to the C# 3.0 language features there is partial IDE support
    • Colorization and New Keywords in Completion List
    • Edit and Continue Rude Edit Detection
  • Partial VB 9.0 Language support (Due to differences in feature delivery schedules VB implementations of the above C# features will appear in a future CTP)
    • Local variable type inference and Option Infer switch
  • VSTS Improvements in load & unit testing such as unit test for devices
  • Device development improvements
    • VSTS integration
    • Access and modify device security configuration from the IDE
  • Enables developers to build and debug a Windows Vista Application
  • Enables Visual Studio Tools for Office developers to build document-level customizations for Word and Excel 2007
  • Enables eMbedded Visual C++ 4.0 developers to use Visual Studio Code Name "Orcas" to build their existing applications
  • NET Framework improvements such as:
    • New managed add-in model enables developers to add a version-resilient extensibility model to their products.
    • Support for time zone conversion, enumeration and serialization, including cases where Daylight Saving Time rules change over time.
    • Reflection in Partial Trust, enabling sand box scenarios for all applications that depend on these features.
    • The ability to control the garbage collector's latency mode
    • Improved CLR ThreadPool micro-performance and throughput for worker and IO completion

Technorati : , ,
Del.icio.us : , ,
Ice Rocket : , ,


WPF Layered Windows and Windows XP

Posted in  |  |  | .  
WPF Icon

I just came across this post by Seema Ramchandani, a WPF PM, saying that WPF will not have hardware acceleration for
layered windows on Windows XP. Nick also elaborates that while there were plans to support this, it was unreliable and sometimes even slower than software rendering.

Technorati : , , ,
Del.icio.us : , , ,
Ice Rocket : , , ,


WPF - I Simply Love It

Posted in  |  |  | .  

WPF IconI have been playing a lot with WPF ever since the RC1 release and I simply love it.
Eyecandy user experience is finally easy to create without a significant amount of effort and code.

Just for example, lately I've been working on a new application which requires a slick widget-like user experience.
In order to display a rounded window with an image containing alpha layer in .Net 2.0 I had to spend significant time on interoping with unmanaged win32 API to get Layered Winodws working with .Net controls.

Now with WPF, its a simple matter of setting AllowTransperancy="True" and adding a rectangle or an image control on the window.

Check this sample out: WPFWidgetWindow.xaml (4.69 KB)

WPFWidgetWindow.png

Technorati : , ,
Del.icio.us : , ,
Ice Rocket : , ,


Visual Studio "Orcas" Development Tools for .NET Framework 3.0

Posted in  |  |  |  | .  

Microsoft Downloads page was just updated with the new Microsoft Visual Studio Code Name “Orcas” Development Tools for .NET Framework 3.0 RC1.
The download is availble here.

From the readme:

Welcome to the release notes for the .NET Framework 3.0 RC1 synchronized release of the Microsoft Visual Studio Code Name "Orcas" Community Technology Preview - Development Tools for .NET Framework 3.0®!

This software package is not planned for final release or support. Most of the technology incorporated in this package will be included in the Code Name "Orcas" release of Visual Studio, and that is where it will reach final release quality, and will be supported as part of that released Visual Studio product.  The full Code Name "Orcas" release of Visual Studio will contain additional .NET Framework 3.0 development technology.  We are providing access to some of this .NET Framework 3.0 development technology early, so customers using Visual Studio 2005 have an improved development experience for .NET Framework 3.0 applications.

Included in this CTP release is the Windows Presentation Foundation visual designer ("Cider") for Visual Studio. The Cider designer is very limited in capabilities in these early technology previews, but does work for very simple layout tasks, can serve as a preview for editing more complex WPF forms, and preserves XAML when moving between the XAML editor and the designer. More information about the Cider designer is on the Channel9 wiki, and questions can be directed to the WPF Designer ("Cider") forum on MSDN.

If you have problems using this package or with Windows Presentation Foundation ("Avalon") or Windows Communications Foundation ("Indigo") development, please utilize the newsgroups and forums that are available to get help from the community, including Microsoft employees that participate in these newsgroups and forums:

Please note that this release only works with the Final release of Visual Studio 2005, and the RC1 release of the .NET Framework 3.0 runtime (which is included in Windows Vista RC1) and the RC1 release of the Windows SDK. Updating any of these without also updating this package will cause problems.

Technorati : , , , ,
Del.icio.us : , , , ,
Ice Rocket : , , , ,