ailon's DevBlog: Development related stuff in my life

Creating Gapped and Bulleted Shapes in WPF/Silverlight

5/26/2009 10:08:37 AM

I’ve released a small control for creating bulleted paths in WPF. You can get it in download section of this blog. The main trick used in this control is described in my article titled “Creating Gapped and Bulleted Shapes in WPF/Silverlight” and published by dev102.com.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

Name scopes within templates are not supported

5/8/2009 3:03:59 PM

I’ve got an issue reported on amCharts for WPF forum suggesting that it’s impossible to use the charts in DataTemplate. I’ve verified that it was true and exception message reads as follows:

"NameScopeProperty found within the content of a FrameworkTemplate, on a 'AmCharts.Windows.LineChart' object. Name scopes within templates are not supported."

The exception was caused by the call to SetNameSpace method in the constructor of the chart base class:

NameScope.SetNameScope(this, new NameScope());

I’ve re-read documentation on name scopes and made an assumption that I have to find a way to use template’s own name scope to register my names with it and…  spent almost a day trying to figure out how to do it universally.

Finally I gave up on that branch of thought and decided to try something else. To my surprise the problem was solved by simply moving the same call to SetNameScope() from constructor to a place right before it is needed. Namely where I make the first call to RegisterName() which happens after my controls have been loaded, templates applied, etc.

Now I’m not completely sure why this worked but my understanding is that if you do it in the constructor SetNameScope() get’s called in the context of the Template (producing an exception above) and when it is called later it’s already in context of the control to which the Template is applied. Please, correct me if I’m wrong.

kick it on DotNetKicks.com Shout it

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

4 Tips for WPF Control Developers

5/5/2009 9:52:22 AM

Dev102.com has published my article titled 4 Great Tips for Custom WPF Controls Developers.

Bonus tip: there’s a 50% discount coupon for amCharts for WPF at the end of that article ;)

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

Book Review: Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition by Matthew MacDonald

4/29/2009 1:42:00 PM

prowpf After a pretty bland and unexciting ASP.NET book this was a very good change. Matthew MacDonald covers all aspects of WPF in a very good and interesting style. All the basics are covered, principles explained and practical advices are given.

Probably my only but pretty serious complaint is about a Chapter 24 - Custom Elements. This was one of the main chapters (aside from basic WPF principles) why I bought this book in the first place. I was developing our WPF charting controls and expected to find some insights and guidance in this chapter. Unfortunately a big chunk of the chapter (which is not so long to start with) was dedicated to explaining logical implications of building a masked text box. Probably quite interesting stuff on it’s own but not directly related to what it takes to build custom WPF elements in general.

Aside from that I’m very satisfied with this book and can highly recommend it to any .NET/C# developer interested in programming for Windows Presentation Foundation.

Verdict: close to perfect

Buy this book on Amazon.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: , , ,

amCharts for WPF 1.0 released

4/27/2009 10:49:00 AM

Pie chart, Column chart, Line chart, Mixed column and line chart

We have just released the final 1.0 version of our charts for WPF. Hooray!

Please, help me spread the word by kicking, shouting, dzoning, cross-posting and otherwise promoting the release. Thanks a million!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Book Review: Professional ASP.NET 3.5: In C# and VB

4/24/2009 4:29:00 PM

proaspnet About a year ago I bought this book when Scott Guthrie promoted a deal on it at Amazon. This was probably the biggest technology book I’ve ever read and it took me months to read and not only because of the size but because it was boooring.

Most of the book is written by Bill Evjen (as far as I understand) and his chapters are very dry and not very different from just browsing through MSDN documentation. There are almost no personal opinions, recommendations or anything. Just plain reference.

Some chapters are written by Scott Hanselman and you can see it right from the start. These chapters offer opinions, advices and you can see a person behind them. I don’t know, maybe it’s just me, but I prefer seeing a person behind a book or an article rather than reading a book which looks like it’s written by some technical documentation team. Unfortunately only a few chapters are authored by Scott.

I couldn’t identify chapters by Devin Rader so he either writes indistinguishably from Bill or Scott :)

The other point to criticize would be the fact that book has samples in both C# and VB. I understand that it’s easier to publish one book instead of two but the book could’ve been like 20-30% thinner and lighter and I wouldn’t have to decide against bringing it with me on the flight (yes, it’s that heavy). And, you know, 300-400 useless pages for almost every reader (either VB or C# developers) doesn’t help preserve Amazonia forests.

Overall this is not a bad book if you are looking for printed ASP.NET reference but not quite a good read if you want some insight, recommendations and depth.

Verdict: complete but dry and boring.

Other recommended books about ASP.NET: 4 years ago I’ve read Programming Microsoft ASP.NET 2.0 Applications: Advanced Topics by Dino Esposito and it was really good. Unfortunately it doesn’t seem that there’s an updated edition of this book by Dino, but there’s other book called Programming Microsoft ASP.NET 3.5. I’m not sure how this new book is related to the older ones (in terms of topics) but I really like Dino Esposito’s style and depth of his books.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

Merging SVN branch back to trunk with TortoiseSVN

3/31/2009 4:38:35 PM

This post is mostly a note to self, cause if I don’t do this for some time I forget how to do it and spend quite some time figuring things out. Actually this is quite a simple task but awkwardly implemented (from my point of view).

Now I did it for a second time in 2 weeks and managed to merge my branch back to trunk from the first attempt, so I decided it’s good ocassion to write things down so I don’t waste time the next time I forget the procedure.

So, here’s what you do after you are finished working on your branch and want to merge everything back to trunk:

  1. Make sure you’ve commited everything to your branch.
  2. Backup your whole working copy (just in case :)
  3. Switch your working copy to trunk: Right click->TortoiseSVN->Switch. Select your trunk URL, HEAD revision and press OK.
  4. Merge (this is the awkward part): Right click->TortoiseSVN->Merge. In from box select URL of your trunk (HEAD revision), uncheck Use “From:” checkbox in To section and select branch URL in To box. Test wit “Dry run” and press “Merge” if everything is correct.
  5. Commit to trunk

That’s it.

Bonus track: here’s a good article on minimizing merging conflicts when working on branches.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

amCharts for WPF 1.0 Beta

3/30/2009 4:33:50 PM

 100% stacked WPF column chart

Just released the 1.0 Beta version of our WPF charts bundle. Added support for column & bar charts.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: ,

amCharts for WPF: Line & Area Chart Released

3/13/2009 12:53:44 PM

Just released Line and Area charts for WPF. The announcement is here.

amCharts WPF Line and Area charts

Enjoy. And help us spread the word if you do!

kick it on DotNetKicks.com Shout it
Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: , ,

Charts for WPF

2/18/2009 4:29:05 PM

I haven’t posted anything significant here for quite some time. That’s not because I’m lazy (that too), but because I’ve been busy working on WPF edition of amCharts. For those who don’t know, amCharts is one of the leading charting controls for web developed with Adobe Flash, and I’ve been working on charts for WPF based on the know-how gathered in 2 years amCharts been out.

WPF charts

Overall working with WPF was quite a pleasant change of scenery. There were some rought edges and you really have to turn your head around if you’ve only been dealing with web and/or Windows Forms before. But after some time you get used to it and it’s really amazing what you can do with it.

So, if you are developing for Windows Presentation Foundation platform or plan too and you need a really flexible and powerful charting solution, take a look at amCharts for WPF. And, btw, you can use it absolutely free even in commercial applications as long as you don’t mind a small link back to amCharts in the corner. Or you can purchase a commercial (link-free) license which are going with 75% discount for now.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags: , ,

Copyright © 2003 - 2009 Alan Mendelevich
Powered by BlogEngine.NET 1.3.1.0