Metro style theme/template designs for blogs

Touchality run a metro style theme contest “Design for Windows Phone 7 Metro UI WordPress Theme” for their blog on 99designs.com. The wining award is $1,023. Six designers submitted 33 designs for that contest. By the time when I checked the contest, the winner was already chosen and the contest was completed so I didn’t manage to see all of the designs but here is what I got.

All credits go to the original designers and people from Touchality and 99designs.

Update:

Patrick Yong shared a working copy of wordpress theme in his blog. You can download it from this link if you like the screenshot below.

Silverlight 5: MVVM got more fun with Implicit Data Templates

A few years back, Julian Dominguez from Microsoft pattern and practice team proposed a solution that uses Implicit Data Teamplate for WPF MVVM application development. You can read the details in his blog post “Presentation Model with DataTemplates in CompositeWPF (Prism) Sample“.  I was working in Xuenn developing WPF applications for sport betting platform at that time and we introduced Julian’s approach to team. We found both advantages and disadvantages of using this approach (I will share with you all the details soon.) but using “Implicit data template” did help a lot for some scenarios.  I’ve been requesting this feature to the team again and again for last a couple of years and I’m really glad that Silverlight team added it in Silverlight 5.

What is Implicit Data Template?

Implicit data template is something similar to “Implicit style” that was introduced in Silverlight 4. When you define a data template in <*.Resources> or resource dictionary, you used to define the key over there and reference it from the place where you want to use that data template. With implicit data template, you don’t need to define any key for your data template. There is a new property called “DataType” where you can define the type of data (Model) in data template that you want to use.

The code will be something like that below ~


<DataTemplate DataType="local:MyAwesomeModel">
....
</DataTemplate>

In this example, our model is called “MyAwesomeModel” and we set it to the “DataType” property of data template. Of course, you can create any template you want inside that data template as usual. After that, you can directly bind this model with UI (e.g. ContentControl or ItemControl ). The template that you created will be displayed on the UI when you run the project. How simple it is?

In order to show this feature, I created one demo with metro design in my mind (even thought I’m not professional designer. )

Download :  ImplicitDataTemplatesDemo from github

What I did in this sample is pretty simple. I created an interface called “IPerson” which has three properties such as Name, Description, ProfilePhoto. And, I created three models (MichaelSync, ElenaSync and ShwesinSync) that implement “IPerson” interface. Note that I didn’t implement INotifyPropertyChanged or the setter in any of the classes but you may want to implement them in real project.


public interface IPerson {
 string Name { get; }
 string Description { get; }
 BitmapImage ProfilePhoto { get; }
}

In MainPage, I set the DataContext in order to make the bindng work. Yap! I have to set it before initializing the components. I added new property called “People” and filled it up with the instances of models.


public partial class MainPage : UserControl
{
 public MainPage()
 {
 this.DataContext = this;
 // Required to initialize variables
 InitializeComponent();

People = new List{
new MichaelSync(),
new ElenaSync(),
new ShwesinSync(),
 };
 }

public IList People { get; set; }
}

There is only one ItemControl that bind to “People” property.

<Grid Width="640" HorizontalAlignment="Left">
 <ItemsControl ItemsSource="{Binding People}" Margin="41,84,41,0"/>
</Grid>

I created three data templates with different data type as below.

When you run it, you will see beautiful metro style application with my family photos. I’m just trying to show you one scenario that you can use but if you really want to use MVVM with implicit data template, I would recommend you to read Julian’s post.

Pros and Cons of using Implicit DataTemplate in MVVM

I would say that Julian’s approach is kinda extreme MVVM approach because it limited you from having any code behind code in View but it does help you more code cleaner (Oh no! I’m not counting code. )  and force developers to use MVVM in proper way (like creating blend bahivors or attached properties or etc). Another good thing is that you can directly bind your model with UI without explicitly calling the views.

Good

  • Cleaner and encourage the proper way of doing things
  • Easier binding

Bad

  • sometimes, it makes developers’ life damn difficult.

That’s all from my side.

Happy Silverlighting!

Be first + Be Smarter + Cheat = ???

Margin Call is one of my favourite moves that I watched in 2011. This movie is about the group of people from large investment firm and what they did in the early stages of the 2008 financial crisis.

I like what John Tuld said in the movie. He said there are three ways to make a living in this business: be first, be smarter, or cheat.

I watched it a couple of months back but when he said came across in my mind when I was checking out one site yesterday. Their product is a UX framework that helps developers to create the metro style “web” application. The UI of their website is very clean and well-structured. I was amazed by the beauty of their website and demo application for a few minutes. I would say that they are one of very first few companies that brought the metro concept to the web and mobiles. By looking at the way that they created their website, demo and framework, and the feedback that I found on twitter, they are very smart people who managed to execute the plan that has a lot of potentials.

but be first and be smarter are not good enough for them so they added something so called marketing trick in their site. I know every side has two stories and you may not call it as a cheating but to me, what they did is dishonest so I called it “cheating”

They asked you to login with Facebook to download the icon collections or framework. I liked their work and I understand that there are some companies that don’t want to implement their own authentication system so they just use Facebook’s Oauth for authorization. I also understand that they will be able to access my private information like email, address or etc.. Anyway, I trusted them so I logged in with my Facebook account and gained them access in order to download their framework.

Do you know what I got? They asked me to have 20 points that I need to spend around 35$ to buy it. I was like WTF! Why don’t you tell me in the first place? I know we all want to get rich and want to make money. $35 is a reasonable price. Me and my company is looking at HTML 5, metro concept for our web application as well. I can put my company to buy for team if your framework is really good even I don’t buy it on my own. We bought license from Infragistic, Telerik and a few others in this way as well.

What pissed me off is NOT about asking money. Why can’t you just honestly tell me in the first place before I gain you access to my Facebook profile?

You guys are very talented but I believe that there is at least one person who wants to cheat other people under the name of “money” or “marketing trick”. Anyway, Good luck but be careful.

Community {Technology} Update 2012, Singapore

Technical Updates for the community, by the community

Community Technology Update is back!!! This is the 9th iteration of CTU and we are doing something different this time round. Thanks to our venue sponsor, we will be holding upcoming CTU at Plug-In@Blk71. Apart from the change in venue, everything else remains the same, especially the Community’s Sprites of CTU!!

User Group of Singapore has come together once again to put up a full day technical sharing event for the community. Like the usual CTU, content are design to keep you updated with the latest technology. We have sessions planned for IT Professionals, Developers and Database Administrators. There is something for everyone so don’t miss this chance and start registering today!!!
As an exclusive member of <Insert your UG name>, you get invited to this event!

Date    07th January 2012
Time   0900 – 1730 hrs
Venue Plug-In@Blk71
Blk71 Ayer Rajah Crescent
#02-18
Singapore 139951
Registration Fees $12 (Early-birds)
$20 (Walk-ins)

Why you should attend this event:

  • To learn about the new generation “8” product. Windows 8 Developer Preview and Windows Server 8 will be covered
  • To learn about Windows 8 and Dev12 devolvement
  • A great chance to network around with IT Pros and Dev in Singapore

Who should attend this event:

  • IT Professionals
  • Developers
  • Database Administrators
  • Essentially you, as you’re one of our user group members!

For instruction to register to this event, go to http://www.sgdotnet.org/events/CTU2012/Pages/Registration.aspx

To find out more about the event, go to http://www.sgdotnet.org/events/CTU2012/Pages/default.aspx

To find out how to get to the venue, go to http://www.sgdotnet.org/events/CTU2012/Pages/Venue.aspx

To find out why we’re charging for the event and other questions, go to http://www.sgdotnet.org/events/CTU2012/Pages/FAQ.aspx

If you have any questions, please feel free to email to Desmond(SWUG Lead) at desmond@sgwindowsgroup.org

Singapore MVP Roundtable Session – Dec 2011

The routable section is an event ogranized by Microsoft Singapore for MVPs, User Group leaders and Microsoft DPE team to meet up and discuss anything from chitchat to serious discussion once in every four months. (Nope, Not this one “Microsoft RoundTable” ). We used to gather at bar in town and Microsoft provides us free flow of drinks and foods (This is where you can order drinks in sequential order from menu. ^^ )

We had a roundtable section last week and it was awesome. I had good discussion with Hammad regarding Windows 8 and tablets. I’m looking forward to hear more from him soon.

Thanks to Clarisse Ng (my MVP lead) for organizing this event.