Implicit DataTemplate in Silverlight 4 Composite UI – Get ready for Silverlight 5 (Part III)

Friday, June 17, 2011

In this post I'll show how did I implemented the ItemsControl implicit data-template using the ImplicitItemsTemplateBehavior attached behavior. But first, lets talk a bit about how WPF searches for an implicit data template, given a collection of items, so we can mimic that behavior in Silverlight. Having an ItemsControl with an ItemsSource property set to a collection of type Shape, WPF looks at the ItemsControl.ItemTemplate. In case that one is missing, and there is no ItemTemplateSelector, it changes strategy, and tries finding a Data Template by traversing upward the logical-tree, looking inside each element resource...

Implicit DataTemplate in Silverlight 4 Composite UI – Get ready for Silverlight 5 (Part II)

Sunday, May 22, 2011

In this post I'll show how did I implemented the ContentControl implicit data-template using the ImplicitContentTemplateBehavior attached behavior. But first, lets talk a bit about how WPF searches for an implicit data template, given a content, so we can mimic that behavior in Silverlight.   Having a ContentControl with a Content set to an instance of type Circle, WPF looks at the ControlControl.ItemTemplate. In case that one is missing, and there is no ItemTemplateSelector, it changes strategy, and tries finding a Data Template by traversing upward the logical-tree, looking inside each element resource dictionary for a...
2 comments

Implicit DataTemplate in Silverlight 4 Composite UI – Get ready for Silverlight 5 (Part I)

Tuesday, May 17, 2011

I'm using Prism 4 in one of my Silverlight 4 Composite UI. Working with Prism, there are two ways populating a Region: You can populate it with a UI element, which is the view, or placing the view-model directly. Personally I support the idea that a UI element must not be treated directly from the Application logic, and there should be ZERO UI elements in the Application logic. So natively, populating a region with a view-model instead of a view sounds more reasonable for me. With WPF things are easier. All you have to do is to create...
no comments

Blendability Part II – Design time support for Prism

Monday, January 3, 2011

In my previous post I’ve presented the Blendability concept and explained how to leverage Blend’s sample-data generation in order to support view-model at design time. In this post I would like to continue with this concept and reveal a tiny research I’ve done related to design time support of Prism modules. If you’ve ever developed a WPF Composite Application using Prism you may be aware of a frustrating problem while trying to work with the Shell at design time. It always ends with something like this: As you can see, the Shell is always left blank, and there is no way to...
20 comments

Prism 4 Release

Saturday, November 13, 2010

Prism 4 November 2010 has been released yesterday by Karl Shifflett. This version of Prism 4 targets: .NET Framework 4.0 Guidance around the MVVM pattern Navigation Managed Extensibility Framework (MEF) You can read more about it here, and download it from here. Enjoy.
no comments

SDP – WPF 4, MVVM, MEF and Friends

Sunday, December 27, 2009

Tomorrow, as part of the SDP conference, I’m having a whole day session dedicated to WPF 4 and LOB applications. What’s in there for you: Short intro to WPF Goodies in WPF 4 Building a Smart Client using WPF 4 Developing Composite Applications using Prism 2 In addition to all of this great stuff, Bnaya Eshet, my colleague at Sela will talk about MEF and how it’s related to WPF and LOB application. I’ll be more than happy to see you there.
no comments

Session – Advanced Topics for Building Large-Scale Applications with Microsoft Silverlight

Thursday, November 19, 2009

In this session, John Papa talked about Silverlight application development patterns such as composite applications with Prism, developing using the Model-View-ViewModel (MVVM) pattern, and methods of implementing large, modular, multi-page applications within your team. Also he talked about frameworks created to help assist in rapid development using these patterns without sacrificing good application development patterns. MVVM is a pattern, there is no specific way to do it right. Also with Silverlight. MVVM, MVC, MVP and MV??? are all commonly accepted patterns for maintainable, scalable and testable applications. People look for patterns to describe common way for programming...

Composite UI Infrastructure Review by Microsoft, Redmond

Monday, October 26, 2009

We’ve just returned back from our Composite UI Infrastructure architecture review by who else but the Prism creators, the Microsoft P&P team, and we’ve also discussed on several WPF issues we’ve got with the WPF team. I have such a great time meeting with David Hill, Blaine Wastell, Julian Dominguez, Rob Relyea, Mike Hillberg, Anson Tsao, Varsha Mahadevan and Jaime Rodriguez. I want to thank each and every one of you personally! Special thanks to Lior Rozner from Microsoft Israel for leading this great infrastructure, and for being a great companion. Many thanks to the rest of our...
2 comments

WPF Performance Sweets – ContentControl (Part 2)

Thursday, September 17, 2009

Part 1 Yesterday I went back to my customer, tried to figure out if the whole concept of using data as the content of a ContentControl instead of holding a logical tree, is truly contribute to the whole system, and guess what? It is not! Well it figured out that setting the content property with non-visual element only postponed the tree-traversal. We figured this out by trying to measure the total elapsed time between setting the content property to null and up until the view completely disappeared. To measure this we called the Dispatcher.BeginInvoke method with...
3 comments

WPF Performance Sweets – ContentControl.Content = null

Friday, September 11, 2009

Part 2 Background Yesterday I came back from my customers’ place. He had performance issues with his WPF composite application. Each time he navigates away from a page, he pays about 1400ms! – Playing around we’d found that each time a page was changed, the composite framework he uses replaces the old page with the new page by simply updating the ContentControl.Content (placeholder) with the new page. This operation solely took about 800ms! placeholder.Content = newPage; In this post I would like to talk about: - Performance problems you may encounter by using ContentControl incorrectly or not using it by the book. - How...
6 comments