- Recent
- Popular
- Tags (0)
- Subscribers (1)
- Expander inside ScrollViewers, a.k.a. when WPF power is out of controlJanuary 3
-
Yesterday, I spent almost an hour on a small but annoying problem. I was working on a visual editor for an IDE, I develop for internal-use. Have I mentioned before that I started working (for more than a couple of months now) in a company again? Clearly, I haven’t been blogging actively passed year. Let’s see whether I will be able to change this in 2009 or not.
Anyway, this visual editor is for a DSL, or should I say a XAML grammar? It was the perfect opportunity to show the power of WPF. However;Problem:
Visual editor’s job is to display the workflow in a tree view fashion. I chose displaying listboxes inside listboxes instead of a treeview. Each last node has an expander inside the listboxitem container. When user expands an item, containing listbox grows to display all of the items. I have no problem with that, in fact, that is exactly what I am grateful for. There is one catch, though. Expander controls not only expand but also shrink. When it does, listbox sits back and enjoys the void. A small sample to play with:
<StackPanel> <ListBox x:Name='xNoFlow - Riatalks, Snooker and JokerAugust 11 2008
-
I usually have a problem giving breaks. My body stopped sending signals to my brain long time ago, due to not getting back any. However I realized that I have limits too.
I was at the riatalks, a two day event at two separate conference halls. I worked out a plan and was going to be able to attend all talks that interested me. However, I forgot one small thing, timing is not an additive function around here. At the first day, even though some presenters couldn’t make it, talks was not over when I had to leave.
At that time, my body had a few reservations already. Some of you might know, snooker is a demanding game, physically and mentally. So I had to shutdown the message queue completely. In contrast, I had my personal best after 5 hours and just before my last sip at 2 A.M. Snooker is sometimes called chess with balls, however chess is a rather simple game. Snooker is pretty much Go with sticks to me.
Second day things got worse, time wise. I kept running between the halls, to see if any starts on time. Still I had the chance to chat with yesterdays last presenter, Daron Yondem. Daron and Ferruh Mavituna (in Turkish)
- Thinking in or out of programming languagesApril 30 2008
-
I remember the first time I took a look at C#. As a C++ programmer, I was impressed not by the language but by the IDE. I could do without multiple inheritance, but there were no templates either; case was closed, for good, I thought. Fortunately, many did not close the case. It did not took long for Microsoft to release C# 2.0; however, to me, damage was done. I am not talking about the huge .NET libraries, for which generics could help a lot. Real victims were the developers; there are still programs being written as if in C# 1.0. I don’t want to go into details of this matter right now. If you want to discuss, please don’t hesitate to comment.
Anyway, I started to use C# and I was happy until 3.0. Wait, wait, I know what is going to happen if I don’t make myself clear. C# is my language of choice when I need UI; but, you can never stop programming in C++. If I happen to use both of them for a project, I constantly switch between C++, C++\CLI and C#. This is where the trouble begins. Before C# 3.0, I could say that my productivity was pretty much the same in each one of them. After 3.0, I caught myself trying to accomplish everything in C# as much as I could. Easiest way is not always the right way. Again, I have got to skip this if I want to finish this post. The point is, I use C# more and more everyday.
I have always had complaints about C# but a few days ago, I realized that some differences in programming languages are harder to overcome than I t
- How many blograms of inventure have I got?March 20 2008
-
It has been a while since my last post. I am not sure why. My intention was to keep it rolling at least once a week. It was not a bad start either. I guess, I thought that a series of articles would help me focus. Since articles were technical, I gained a bit of recognition. So, why not continue? I was really busy at work, but knowing that is never an excuse for me, I kept looking.
Now, I realize that I felt obliged to keep the style. I didn’t want to steal readers’ time with my personal ramblings. Each time I started writing a new post, I found a different reason not to. Sometimes, I wasn’t happy with the quality. Some were a lot more time consuming than it should be, especially C++ ones. I wanted to write articles which were original if not extra-ordinary. Well, I couldn’t be more wrong. I have got to make mistakes and make them soon. Not only that, I know why I want to make mistakes. Here is the story.
Last month, I made a few important decisions about my life. Maybe the most important of all was to quit my job. It was a sudden decision. After a couple of though weeks, I managed to clean up my ongoing tasks and proved my sketches to my ex-co-workers. I had no plans, whatsoever. Initial reactions were like “- Where is your new workplace ? — There isn’t any “. Only a few close friends did not act as if I had lost my mind. Without a regret, I gave myself a few weeks of rest. A sabbatical year is not common among programmers,
- WPFix Part 3 (Extension Methods)November 25 2007
-
One of the new features, a.k.a. syntactic sugars, in C# 3.0 is extension methods. At first, it looks like compiler magic and it is no big deal. But isn’t it the same about class method? When a function argument is hidden, suddenly whole world changes. Clearly, OOP is not just a hidden this pointer, but we can think of extension methods as class methods that will only access the public fields. This may look like a step backwards but we are not living in an ideal world, in fact not even close to ideal. This is more like a side-step that will provide new ways forward. One of these new ways is LINQ, language integrated query. However, it is hard to come up with another as useful as LINQ. Is there a way to utilize extension methods in WPF as we did lambda expressions?
While introducing the lambda converters, I said that implementing IValueConverter or IMultiValueConverter is not a complete waste of time. There were two reasons behind this statement and hence two problems ahead of lambda converter with dreams of being the ultimate binding converter.
Problem 1
One of them was code maintainability in large projects, where a converter can be used more than once. Typing the same expression again and again is not an option.
Solution 1
Idea occurred to me, while reading Kent Bogaart’s article on

