Email: zamjad at


  1. great article about dependency properties, do you have something about routed events as well

  2. Hi zamjad,

    sorry for this mail. But when I was searching for a solution on grid splitters in WPF I saw the picture of your blog, which seems to be generated from a terrain rendering program. Since terrain rendereing is a hobby to me I will ask you, if I’m right or not. If I am right, would you be so kind and give me more information about the program you used.

    Thanks in advance

    • Hi Ernst

      Thanks for taking interest in my blog, but i didn’t understand completely which picture you are taking about. If it is about icon that appears with my name while replying the comments, then it is automatically generated by the wordpress, i dont know what algorithm they are using. I didn’t use any terrain rendering algorithm anywhere in my posting (not at least till now). Most of my programs are related to WPF and the one you mentioned (grid splitters in WPF) also uses WPF. Can you please further explain your question.

      Zeeshan Amjad

  3. Hi,

    I don’t see any post in this blog about interoperability between C# and JAVA. I have a C# server and I would like to extend client support for JAVA programming language.

    My current project has C# client and C# server architecture using TCP funtionality. I would like to introduce a JAVA client soon.

    Could you please help me to find what are the possible options and what is the best approach to support this request?

    Thanks for your cooperation.

    • Hi

      I think you can do it in two steps. You are suppose to create a C DLL (in Visual C++) which both C# and Java can understand. You can use PInvoke to do C# to C communication and JNI to Java to C communication. It would be something like this

      Java C C#

      I wrote two articles on this topic. One to discuss Java to C communication and other to discuss C to C# communication. You can take a look at those here.

      Integrating Visual C++, Java and Assembly

      Using Unmanaged code and assembler in C#

      I hope it helps.

      Zeeshan Amjad

  4. Hi Zeeshan,

    I need to develop a multi column combobox with in a datagridcolumncombobox using wpf.Could you please help me on this.

    • Hi Suresh

      You can do it by defining DataTemplate for CellTemplate (I guess you are taking about DataGrid). In DataTemplate you can define a Grid (or any other layout to display the data) to show the data in the form of multi column. Please correct me if I didn’t understand your requirment correctly.

      Zeeshan Amjad

  5. Am I able to use this for web application? I want to use MVC pattern combined with the Mediator pattern to make my controllers loosly coupled.

    But my application is going be large. There will be 20.000 users. We expect 1000 concurrent users.

    I have created controllers. Each controller have his own view. (Like: PersonListController and PersonListView). With the mediator the send messages to each other without knowing of their existing. The problem is, when defining the controllers at this niveau then there will be over 1000 controllers. Is this a problem?

    Also I read about WPF. In my situation, what will be better?, using MVC ASP.NET and Mediator or WPF MVC? What is the impact to the system whe using MVC ASP.NET with Mediator pattern (no WPF)?

    I will appreciate if you can help.

    Thank you,

    • Thanks for reading my blog. Technically there is nothing stopping you to use the mediator in ASP.Net application using MVC. But this mediator is not complete yet. Currently this is having a strong reference of all the register classes, which is good if we know when to unregister the class. But sometimes we don’t know the object lifetime and in that case keeping a strong reference prevent garbage collector to collect the memory of that reference. Ideally this mediator should have the WeakReference insteaed of Strong references.

      I don’t understand completely why do you want to compare ASP.Net and WPF. WPF is used for making client application or browser application (XBAP Application), on the other hand ASP.Net is used to make server side web application. These technologies are not interchangable and which technology to use depends on your requirement. In addition, WPF programmer mostly use MVVM pattern rather than MVC pattern.

      Zeeshan Amjad

  6. Zeeshan,

    Maybe I’m missing something but is there a download version of some of your samples? or do I have to cut / paste? I’m interested in the MVVM code.

    Great info
    Regards Tony

    • Hi Tony

      Thanks to visit my blog. There is no download version now. I am thinking to give some download links to sky drive or somewhere else. But I can mail you the code of the particular article. Which article you are interested so i can email you the code of that article.

      Thanks and Regards
      Zeeshan Amjad

  7. Hi Zeeshan Bahi Assalam O Aliakum,, student from university of karachi ,final year…. your profile is a source of inspiration for many of DCS student, even your skills and experience is Mashallah by the grace of ALLAH are exceptional. Alhamdulilah, I have been quite good student and have tried my level best to excel in studies and especially as a software engineer. The time period i m passing through is some time very troublesome as you can realize we really need some guidance and blessing of ALLAH. The question i want to ask is that
    Recently due to some hardwork and by the Grace of Allah i have been offered for a job in 2 prestigious Software Houses in karachi. One is offering JAVA engineer and other is offering .NET.
    I dont know but i may b wrong but community of people around me told that java engineers are successful in the long term in consider to .net

    I am Extremely confused, i have asked ALLAH to help and its a dear request to you to Kindly Guide me as career counsel, As Mashallah You are blessed with experience and success.

    Please it would be kind of you to reply me on email if possible out of your busy schedule or just write down your guidance here.

    It will be blessing for all of the youngsters like me.
    What is the thing that i should focus on and what is the right Path.

    Waiting for your reply Please..

    • Thanks to visit my blog and like it. Please check your email.

      Zeeshan Amjad

  8. Hi Zeeshan,
    i am fan of your blog and regular visitor.i saw your article on Defining Multi level Group Style in wpf.its awesome and very useful.
    could you please tell me that how to define Multi level Group Style if level count is dynamic.

    • Hi Pavithra

      Thanks to like my blog. In fact i never tried it for dynamic level count. You gave me an idea to explore. If i will came across any solution, i will post here in my blog. Again thanks to like my blog.

      Zeeshan Amjad

  9. Hi Zeeshan,
    Sorry if this isn’t a right place to ask something.
    I am very beginner in WPF and try to design UI in WPF. The engine part is coded in C++.
    When I click a button, it will call C++ function.
    Could you please recommend your blogs or website and then I can study.
    Thank you.

    • Hi Hyundo

      Thanks to visit my blog. Please give me little bit more detail about the C++ engine. There are multiple possibilities. For example you can use the /clr switch to compile it with C++.Net and then use it as a .net class library. Another option is you can create a COM wrapper of C++ component and then use it in .Net. One more option is export C++ engine functionality as C API’s (no overloading, no classes, no namemangling etc) and then use PInvoke to execute that code. In all cases I am assuming that your C++ engine is not displaying anything and perform only computation. If you want to display something from C++ then it create another level of complexity.

      This is just a general guide line what are different possibilities.

      Zeeshan Amjad

  10. Hi zeeshan Bhai,

    Need a quick solution !
    Q. How to show List in Combobox in Wpf?
    Q.And After Listing the list in Combobox the Selected item should Display in the Combobox Text Area?

    Wating For your quick Responce !


    • Sorry Asim for late reply. Today I saw your comment and found your question interesting. I tried to solve it and wrote a blog entry based on your question. Please take a look at I hope it solve your problem. Thanks a lot to visit my blog.

      Zeeshan Amjad

  11. Zeeshan Amjad:
    I have some doubts about this post:

    Do you have an example?
    I really tried to do it but i couldn’t…

    Is it on the same class?
    Or are you using some of them?

    Could you help me?

    • Thanks to visit my blog. Can you please send me your email address so I will send you the project. And yes it is in the same class.
      Best regards
      Zeeshan Amjad

  12. Hi Zeeshan, you know what! Today I was checking and deleting my old bookmarks and I came across a very nice article by you, written on 19th August 2004 on Code Guru website. Here is the URL:

    • Thanks to like the article. I am glad that you like it.

  13. Hi Sir Zeeshan,

    I want to know that despite we can implement localization by defining multiple resources in an WPF Application, is there any other way by which we would not have to define each language separately and still our app can be changed to any language on runtime? Please reply on priority.


  14. Hi Zeeshan…can you send me source code… in zip format my email address is

Leave a Reply to Suresh Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: