XAML styles in external assembly

Today I will show you how to use the XAML styles located in resource dictionary in external assembly. I will also try to point out the common problems that can raise during this process. We start with one project WPF application and the resource dictionary included in main window dictionary. and we want to extract the styles from section Window.Resources, place them in separate…

By Mirek on (tags: resources, styles, WPF, XAML, categories: architecture)

Customizing WPF combo box style

It this post we will try to create a custom combo box style which adjust the look of standard control to our needs. In general we will try to change this standard look of combobox and achieve something like this Great styling examples for combo box, buttons and tab items can be found on Codeplex, which I based my work on. If you are not familiar with styling in wpf there is a l…

By Mirek on (tags: combobox, CustomTemplate, style, WPF, categories: code)

Simple WCF. Hosting WCF service by Autofac in ASP.NET MVC 3

One of features of Autofac is that it can be used to host a WCF service. I have tried to host a WCF service within an already existing ASP.NET MVC 3 web application. The problem was that the service needed to use some resources which were managed by Autofac and was also used this MVC application. I spend few hours until I figure out what is going on and how to make it work toge…

By Mirek on (tags: Autofac, IoC, MVC 3, WCF, categories: code)

Localized enums with Entity Framework Code-First 4.1 in WPF MVVM and ASP.NET MVC 3. Part 3)

Part 3. Displaying and binding localized names of enum values in ASP.NET MVC 3 application To display localized enums in ASP.NET MVC 3 application we use custom description attribute described in Part 2) and extension method to get the description for each enum value. The type converter is not useful here so we need another approach to achieve the goal. Let’s generate the editi…

By Mirek on (tags: ASP.NET MVC, Code First, Entity Framework, enums, lozalization, mvvm, WPF, categories: code)