Example Codes

My .Net Blog — posts in this category.

Example Codes

Horizontal Stackpanel in WPF

Stackpanel is a useful layout control in WPF. If you have a set of elements need to sit side by side each other, this is your best option. For example, in my…

Read more
Example Codes

Styles in WPF

I have some styling in my WPF opensource project, AdvGen Contact Manager. That is similar with css, just state the class name like : <Grid Grid.Column="1"…

Read more
Example Codes

Creating my first MVC5 Project

In the old time, we choose the MVC project templates to create a new project. In the Visual Studio 2013, The workflow to create a new MVC5 project is different…

Read more
Example Codes

Defining Styles in WPF

Of course, we can put the styles for controls in each windows xaml file. But I am more prefer to all styles storing in a single file, that is more similar with…

Read more
Example Codes

Singleton in C#

To implement Singleton Pattern in C#, that is easy. I like to static class. For example: public static class GobalData { public static Group Group {get;set;} }

Read more
Example Codes

JSON in WCF

A lot of people know about WCF supports XML as the return response. Actually, it supports JSON. All you need to set ResponseFormat.…

Read more
Example Codes

Our .Net CMS - AdvGenCMS

Recently, our Company(AdvanGeneration) have built a lightweight .Net CMS,AdvGenCMS. I did some researches for .Net CMS. The most of them have own their ORM and…

Read more
Example Codes

MVC 3 Example

I have completed the users section for AdvGenCMS. I used ASP.Net MVC 3 and Razor to do. It has CRUD functions and used the LINQ Repository Pattern. I think that…

Read more
Example Codes

Custom Membership Provider

Custom Membership Provider is easy to do. Firstly, please extends MembershipProvider public class AdvCMSMembershipProvider : MembershipProvider Secondly, Right…

Read more