[Home] [Recent] [Site Map] [SharePoint] [XBOX]
Add Comment | digg this
Add Comment | digg this
Add Comment | digg this
I"ve created a simple template for creating a new WPF/E template for Blend. Simply download the .zip file and extract it your Blend directory (usually c:\program files\microsoft expression\blend 1.0\). Once you do that you can "Add New Item..." and add a WPF/E Asset like so:

Let me know if you have any problems...
2 Comment(s) | digg this
I"ve blogged about how short-sighted it seemed that the Expression tools were not going to be available to MSDN Subscribers. I am glad to report that they have come to their senses! I think it is a great comprimise to include Blend and Web in MSDN. Expression Design and Video will still require additional licensing outside of MSDN, but they are less developer tools anyway.
I want to thank everyone inside of Microsoft who I know lobbied hard for this. It was a big political fight and it required opinions across the company to sway the decision. I for one will appreciate the benefits of this fight.
1 Comment(s) | digg this
I"ve worked up a simple example of how to use Commands in WPF. This example includes:
Please let me know what you think of the sample.

Add Comment | digg this
I"ve been digging into the Command infrastructure in WPF lately and I really like the way it works. Essentially it is a way to separate the idea that you have commands that a particular applciation can execute and the ways you start a command (e.g. menu, toolbar button, context menu, hotkey, pen gesture). WPF comes a standard set of commands that are commonly used (e.g. New, Close, Copy, Paste, Cut, etc.). You can define your own commands fairly easily as well.
In the XAML you can declaratively specify the commands like so:
<Window.CommandBindings>
<CommandBinding Command="ApplicationCommands.New"
Executed="OnNew" />
<CommandBinding Command="ApplicationCommands.Close"
Executed="OnClose"
CanExecute="OnCanClose"/>
<CommandBinding Command="local:Window1.ImportFileCommand"
Executed="OnImportFile" />
<CommandBinding Command="local:Window1.ExportFileCommand"
Executed="OnExportFile" />
<CommandBinding Command="local:Window1.ChangeViewCommand"
Executed="OnChangeView" />
</Window.CommandBindings>`
Finally, you can specify the command on XAML elements (with an optional CommandParameter) like so:
<Menu DockPanel.Dock="Top">
<MenuItem Header="File">
<MenuItem Header="New" Command="ApplicationCommands.New" />
<Separator/>
...
</Menu>
<ToolBar DockPanel.Dock="Top">
<Button Command="ApplicationCommands.New">New File</Button>
...
</ToolBar>
Then you can create a single event to handle whichever way the commands are executed (see the Executed attribute on the CommandBinding above).
Lastly, I really like the CanExecute facility which allows you to have a callback that can determine whether a particular command is enabled or not. This callback is executed by WPF to see whether to disable any controls that are tied to that command. If one is disabled (like in a Menu and in a toolbar) they both get disabled.
I hope to have a good example to share with you in the next couple of days.
Add Comment | digg this
I"ve been digging a bit into how themes work for a new article. In doing that I wanted to see how WPF used their theme files. Their theme files are stored as BAML in the PresentationUI assembly. As usual reflector came to the rescue with a BamlViewer plugin (available as part of the ReflectorAddIn"s CodePlex Project).
I downloaded it and started to look at the generic.xaml file that WPF uses. Unfortunately the XAML window in the add-in was hard to navigate and didn"t support searching. What I really wanted was a way to support select/copy in the XAML viewer and a way to actually save the XAML files so I could do more in depth investigating. Since the add-in didn"t support, I volunteered to add it:

I am not sure if the latest version that I have linked to above includes my changes yet or not. If it doesn"t, you can download the sources and they definitely have my changes.
Now...back to that generic.xaml file...interesting...but you"ll have to read my upcoming article to see what I found!
Add Comment | digg this
I"ve been digging a bit into how themes work for a new article. In doing that I wanted to see how WPF used their theme files. Their theme files are stored as BAML in the PresentationUI assembly. As usual reflector came to the rescue with a BamlViewer plugin (available as part of the ReflectorAddIn"s CodePlex Project).
I downloaded it and started to look at the generic.xaml file that WPF uses. Unfortunately the XAML window in the add-in was hard to navigate and didn"t support searching. What I really wanted was a way to support select/copy in the XAML viewer and a way to actually save the XAML files so I could do more in depth investigating. Since the add-in didn"t support, I volunteered to add it:

I am not sure if the latest version that I have linked to above includes my changes yet or not. If it doesn"t, you can download the sources and they definitely have my changes.
Now...back to that generic.xaml file...interesting...but you"ll have to read my upcoming article to see what I found!
Add Comment | digg this
Add Comment | digg this
Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!
Links:
Jack's Readings
Month Archives:
Oct 2007
Sep 2007
Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News
@2007 All rights Reserved |