Hello.

I am Paul Kinlan.

A Developer Advocate for Chrome and the Open Web at Google.

I love the web. The web should allow anyone to access any experience that they need without the need for native install or content walled garden.

DevWeek Day 3 Review

Paul Kinlan

DevWeek Day 3 wrapped up my attendance with increasingly advanced sessions. Christian Weyer's talks on SOA development using the Webservice Software Factory (and its limitations) and integrating WPF, WCF, and WF were insightful, showcasing practical applications and upcoming open-source tools. Niels Berglund's LINQ discussion, while informative, left me wanting more technical depth and raised concerns about tight database coupling. Jeff Prosise's WPF/E presentation highlighted its potential for rich web UI but also its current limitations regarding input controls and data binding. The lack of VisualBrush in WPF/E and its similarities with the upcoming Flash 9 release were noteworthy discussion points.

Read More

DevWeek Day 2

Paul Kinlan

Day 2 of DevWeek was packed with insightful sessions. Niels Berglund's talk on ADO.NET v.Next and the Entity Framework highlighted the potential for simplifying database interactions by mapping database models to programmer-friendly models. Kelvin Henney's lecture on streamlined object-oriented analysis emphasized the importance of modeling the current system before designing solutions, using UML and Use Cases. Ingo Rammer's presentations on scalability and performance, and Windows Workflow integration, offered practical advice and cleared up some misunderstandings. I also had a chance to visit vendor booths, with Infragistics' XAML components and Dev Express's slick presentations standing out. Overall, the quality of the lectures has been excellent, but the vendor presence could be improved.

Read More

Could it all be done in XAML

Paul Kinlan

Inspired by my recent success binding XAML directly to Amazon's web service, I'm exploring the possibility of extending this approach to other RESTful services. Imagine building applications, like my AJAX Tagger, entirely in XAML, without any C# code. This hinges on WPF's capabilities. Do you think it's feasible?

Read More

Amazon Search in XAML

Paul Kinlan

I explored XAML databinding with Amazon's REST API, inspired by a Channel 9 RSS reader example. The XAML code fetches data from Amazon and displays it. A key challenge was handling Amazon's default namespace, requiring a NamespaceManager for correct XPath queries. The provided example demonstrates the basic functionality, and it can be expanded upon.

Read More

Programming Windows Presentation Foundation (WPF)

Paul Kinlan

I'm diving back into XAML after a break and reviewing "Programming: Windows Presentation Foundation." So far, the book is well-written with clear C# and XAML examples. While the initial XAML overview is a bit fast-paced, the layout section (Chapter 2) is excellent, offering helpful examples for each concept.

Read More

Changing Styles with the times (Answers and Thoughts)

Paul Kinlan

I've been discussing how to load styles and new UI designs into an Avalon application, specifically focusing on the challenge of connecting the UI to the code-behind class when loading XAML at runtime. While the XAML loader can parse properties, it doesn't automatically handle event delegate generation and element naming like compiled code/BAML. One idea is to have UI designers create BAML, allowing the app to load new compiled XAML and use the same code-behind class. Another approach involves designing multiple layouts sharing the same code-behind class. I'm also exploring loading a XAML file with resources at runtime and assigning them dynamically. More to come on my findings!

Read More

Looks like you can do it! Yipee!

Paul Kinlan

I found a way to dynamically load resource files for skinning XAML apps! It's surprisingly easy. One method involves simply loading a resource and assigning it to the application. Another example demonstrates loading "Style" resources at runtime, allowing for dynamic visual trees and other customizations. Check out the links for more details and code examples.

Read More

Changing Styles with the times

Paul Kinlan

I'm exploring ways to dynamically change the layout and styles of my Avalon application at runtime, allowing users to switch between different UI themes. I'm considering several approaches:

  1. Stylesheets: Can styles be stored externally and loaded dynamically? I've looked at DynamicResource but I'm unsure if it supports loading XAML from external files.
  2. Dynamic XAML Loading: Can I reload the XAML used by a window at runtime using LoadComponent? The _contentLoaded flag suggests this might not be possible.
  3. Restart on Style Change: A simpler but less desirable option is to require the application to restart when the user changes the UI style.
  4. Localization Analogy: Could the localization framework be adapted for loading different XAML files? I'm unsure if there's a connection between Resource Files and XAML resources.

Read More

DoubleAnimation Crashes XAMLPad (MayCTP): Some Answers To Questions

Paul Kinlan

DoubleAnimation crashes in XAMLPad (May CTP) when animating Width or Height without specifying both "From" and "To" values, or when a base value isn't set. This is because the animation infers these values from the base value, which may not be available until layout execution. Setting the Width or Height on the element or in a style usually resolves the issue. However, I encountered a case where animating a MenuItem's width failed even after attempting to set a default width through a style. A suggested solution involved explicitly setting the width on the element, as the animation infers the 'To' value from the base value, which needs to be available for a smooth transition. I then tried setting a default Width on the MenuItem Style and the crash still occurs in XAMLPad. My next step is to test this in a WinFX application.

Read More

XAML Menu Throbbing! (Answers to Questions)

Paul Kinlan

I've found answers to my XAML menu throbbing questions! Using RoutedEvents in ControlTemplates (and DataTemplates!) lets me start and stop timelines for animations. I can place these triggers inside styles, and it turns out TargetName isn't always required. A cool discovery: storyboards inside ControlTemplates/DataTemplates can be accessed by any control matching the style's TargetType. My wobbly menu example demonstrates these techniques.

Read More

DoubleAnimation Crashes XAMLPad (MayCTP)

Paul Kinlan

I've encountered a crash in XAMLPad (May CTP) when animating the width of a MenuItem. Specifically, if I remove the "From" attribute in a DoubleAnimation within a SetterTimeline, XAMLPad crashes. I expected the animation to start from the MenuItem's default width. Is this the correct way to use DoubleAnimation without specifying "From"? The crash occurs in a specific context: the Timeline is defined within a Style applied to a HeaderTemplate's DataTemplate element for a custom-drawn control. See the linked XAML for a complete example.

Read More

XAML Menu Throbbing!

Paul Kinlan

I had this cool idea to add some throbbing action to my GelButton menu items in XAML. I wanted them to subtly pulse when hovered over. Turns out, it's harder than I thought! I've learned some limitations in XAML (May CTP): you can't start/stop storyboards from triggers, apply a single animation to all controls of a type, and TargetID is deprecated in favor of TargetName. Points 1 & 2 are especially problematic as they blur the lines between UI and application logic. I'm going to look for workarounds and see if others have solutions. Might even post my (probably wrong) ideas on how things should work.

Read More

XAML Menu Example

Paul Kinlan

I've been experimenting with the Microsoft Avalon CTP (Community Technology Preview) Framework and wanted to share a simple XAML menu example. This example demonstrates how to create a custom style for menu items to make them look like GelButtons. Initially, I tried using a ControlTemplate but later realized a HeaderTemplate within the style was the correct approach. The XAML code provided creates a menu with styled menu items, showcasing how to customize the appearance and behavior of menu items in Avalon.

Read More

XAML Menu Example: Addendum

Paul Kinlan

A quick follow-up to my last post about the XAML menu example: It no longer uses the Animated Gel Button animation, and the GelButton code modification I mentioned actually came from a different page on the same site I linked previously.

Read More