<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Andre's Non-Technical and Other Musings</title>
	<atom:link href="http://thedovgals.com/andre/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://thedovgals.com/andre/blog</link>
	<description>Not Just Another WordPress Weblog</description>
	<pubDate>Sun, 25 Apr 2010 00:00:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WPF Datagrid and Legacy Applications</title>
		<link>http://thedovgals.com/andre/blog/?p=98</link>
		<comments>http://thedovgals.com/andre/blog/?p=98#comments</comments>
		<pubDate>Sun, 25 Apr 2010 00:00:14 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Technology Depth]]></category>

		<category><![CDATA[WPF datagrid row indicators]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=98</guid>
		<description><![CDATA[When you migrate legacy LOB applications,  your customers always want to keep &#8220;old good&#8221; features.  I still remember how in mid-1990s I delivered a new fancy system to one of the Lower Mainland warehouses.  Client-server application with a fancy Windows 95 client and MS SQL Server as a back-end&#8230;  I was [...]]]></description>
			<content:encoded><![CDATA[<p>When you migrate legacy LOB applications,  your customers always want to keep &#8220;old good&#8221; features.  I still remember how in mid-1990s I delivered a new fancy system to one of the Lower Mainland warehouses.  Client-server application with a fancy Windows 95 client and MS SQL Server as a back-end&#8230;  I was so proud of myself&#8230; The first question that I heard from the customer was &#8220;How can we get rid of these colors?&#8221; &#8212; she meant new Windows 95 colors&#8230;</p>
<p>Well, now working with WPF&#8230; &#8220;How can we have Access/Visual Basic 6/old programs-like indicators for selected and new lines on the data grids?&#8221;  That is the question, as Shakespeare would say.</p>
<p>I spent a lot of time (and I mean a lot) to answer this question, especially its second part about the new line indicator.  And see what I got:</p>
<p><a rel="attachment wp-att-128" href="http://thedovgals.com/andre/blog/?attachment_id=128"><img class="alignnone size-full wp-image-128" title="wpf201004241" src="http://thedovgals.com/wordpress/wp-content/uploads/2010/04/wpf201004241.jpg" alt="wpf201004241" width="382" height="336" /></a></p>
<p>The following style completely defines the selected row indicator and partially (you also need some code behind) deals with the new row indicator:</p>
<pre><span style="color: #000080;">        &lt;Style TargetType="toolkit:DataGridRowHeader"
               x:Key="DataGridRowHeaderStyle"&gt;
            &lt;Setter Property="Content"
                    Value="{Binding Converter={StaticResource cnvNewRowIndicatorConverter}}" /&gt;
            &lt;Setter Property="Foreground" Value="RoyalBlue" /&gt;
            &lt;Setter Property="FontWeight" Value="Bold" /&gt;
            &lt;Setter Property="FontSize" Value="15" /&gt;
            &lt;Setter Property="Height" Value="18" /&gt;

            &lt;Style.Triggers&gt;
                &lt;Trigger Property="IsRowSelected" Value="True"&gt;
                    &lt;Setter Property="Template"&gt;
                        &lt;Setter.Value&gt;
                            &lt;ControlTemplate&gt;
                                &lt;Border BorderBrush="Black"
                                        BorderThickness="0,1,0,1"
                                        Margin="0,-1,0,0"&gt;
                                &lt;DockPanel Background="Transparent"&gt;
                                &lt;Path x:Name="arrow"
                                      StrokeThickness = "1"
                                      Fill            = "RoyalBlue"
                                      Data            = "M 5,13 L 10,8 L 5,3 L 5,13"/&gt;
                                &lt;/DockPanel&gt;
                                &lt;/Border&gt;
                            &lt;/ControlTemplate&gt;
                        &lt;/Setter.Value&gt;
                    &lt;/Setter&gt;
                &lt;/Trigger&gt;
            &lt;/Style.Triggers&gt;
        &lt;/Style&gt;</span></pre>
<p>For the new line indicator we need to add some code behind:</p>
<pre><span style="color: #000080;">Public Class NewRowIndicatorConverter</span></pre>
<pre><span style="color: #000080;">    Implements IValueConverter</span></pre>
<pre><span style="color: #000080;">    Public Function Convert(ByVal value As Object, _</span></pre>
<pre><span style="color: #000080;">                            ByVal targetType As System.Type, _</span></pre>
<pre><span style="color: #000080;">                            ByVal parameter As Object, _</span></pre>
<pre><span style="color: #000080;">                            ByVal culture As System.Globalization.CultureInfo) As Object _</span></pre>
<pre><span style="color: #000080;">                            Implements System.Windows.Data.IValueConverter.Convert</span></pre>
<pre><span style="color: #000080;">        If value Is Nothing Then Return ""</span></pre>
<pre><span style="color: #000080;">        If value.GetType.FullName = "MS.Internal.NamedObject" Then Return "*"</span></pre>
<pre><span style="color: #000080;">        Return ""</span></pre>
<pre><span style="color: #000080;">    End Function</span></pre>
<pre><span style="color: #000080;">    Public Function ConvertBack(ByVal value As Object, _</span></pre>
<pre><span style="color: #000080;">                                ByVal targetType As System.Type, _</span></pre>
<pre><span style="color: #000080;">                                ByVal parameter As Object, _</span></pre>
<pre><span style="color: #000080;">                                ByVal culture As System.Globalization.CultureInfo) As Object _</span></pre>
<pre><span style="color: #000080;">                                Implements System.Windows.Data.IValueConverter.ConvertBack</span></pre>
<pre><span style="color: #000080;">        ' this function is not supposed to be called</span></pre>
<pre><span style="color: #000080;">        Throw New Exception</span></pre>
<pre><span style="color: #000080;">    End Function</span></pre>
<pre><span style="color: #000080;">End Class</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=98</wfw:commentRss>
		</item>
		<item>
		<title>WPF Datagrid IsReadOnly</title>
		<link>http://thedovgals.com/andre/blog/?p=85</link>
		<comments>http://thedovgals.com/andre/blog/?p=85#comments</comments>
		<pubDate>Sat, 03 Apr 2010 16:21:06 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[datagrid]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=85</guid>
		<description><![CDATA[I have datagrids (from the WPF toolkit) that are read only.  Nevertheless, once in a while certain dataset (ADO.NET) columns were producing the following error:
&#8220;A TwoWay or OneWayToSource binding cannot work on the read-only property &#8230;&#8221;
even if the corresponding binding used the OneTime or OneWay mode.
This was happening for each expression column in my [...]]]></description>
			<content:encoded><![CDATA[<p>I have datagrids (from the WPF toolkit) that are read only.  Nevertheless, once in a while certain dataset (ADO.NET) columns were producing the following error:<br />
&#8220;A TwoWay or OneWayToSource binding cannot work on the read-only property &#8230;&#8221;<br />
even if the corresponding binding used the OneTime or OneWay mode.<br />
This was happening for each expression column in my dataset tables.</p>
<p>What I learned:<br />
1. There is a bug in the WPF toolkit (don&#8217;t know whether it&#8217;s removed in VS 2010), that sets the binding as TwoWay even if it is explicitly defined as OneWay/OneTime.<br />
2. To avoid the problem one simply needs to specify IsReadOnly=&#8221;True&#8221; for all expression  columns.</p>
<p>PS.  Same error occurs if the column is created using calculations in the SELECT statement. </p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=85</wfw:commentRss>
		</item>
		<item>
		<title>Windows Presentation Foundation</title>
		<link>http://thedovgals.com/andre/blog/?p=83</link>
		<comments>http://thedovgals.com/andre/blog/?p=83#comments</comments>
		<pubDate>Fri, 05 Mar 2010 02:10:27 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=83</guid>
		<description><![CDATA[I have completed my long WPF project. Well, it was quite an experience.  I guess, now I can modestly call myself a WPF Architect.  I&#8217;ll try to summarize this experience and soon come up with a few blog posts about WPF problems I ran across.
]]></description>
			<content:encoded><![CDATA[<p>I have completed my long WPF project. Well, it was quite an experience.  I guess, now I can modestly call myself a WPF Architect. <img src='http://thedovgals.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I&#8217;ll try to summarize this experience and soon come up with a few blog posts about WPF problems I ran across.</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=83</wfw:commentRss>
		</item>
		<item>
		<title>The most annoying feature of Visual Studio</title>
		<link>http://thedovgals.com/andre/blog/?p=81</link>
		<comments>http://thedovgals.com/andre/blog/?p=81#comments</comments>
		<pubDate>Sun, 28 Feb 2010 21:21:59 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=81</guid>
		<description><![CDATA[When I perform a search in my project files (entire project), the Visual Studio first searches in the open documents, then opens one more document with the search string, and stops!  Why on Earth it is doing it?  When I start the search again, it searches all open files again (including the last [...]]]></description>
			<content:encoded><![CDATA[<p>When I perform a search in my project files (entire project), the Visual Studio first searches in the open documents, then opens one more document with the search string, and stops!  Why on Earth it is doing it?  When I start the search again, it searches all open files again (including the last open file), opens one more file and stops.</p>
<p>But even more annoying is the fact that, in the debugging mode, VS just keeps cycling through the open files even if I asked it to search in the entire project.</p>
<p>After several years I cannot get used to this feature&#8230; or should I say &#8220;bug&#8221;?</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=81</wfw:commentRss>
		</item>
		<item>
		<title>All the King&#8217;s Architects</title>
		<link>http://thedovgals.com/andre/blog/?p=79</link>
		<comments>http://thedovgals.com/andre/blog/?p=79#comments</comments>
		<pubDate>Tue, 01 Sep 2009 01:00:15 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=79</guid>
		<description><![CDATA[I was reading an article today that compared a couple of Microsoft products&#8230; anyway&#8230; the author suggested a new (at least to me) Architect role&#8230; a XAML Architect role.
I should definitely add it to my resume  along with a Scrambled Eggs Architect and a Funny Architect.
]]></description>
			<content:encoded><![CDATA[<p>I was reading an article today that compared a couple of Microsoft products&#8230; anyway&#8230; the author suggested a new (at least to me) Architect role&#8230; a XAML Architect role.</p>
<p>I should definitely add it to my resume <img src='http://thedovgals.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> along with a Scrambled Eggs Architect and a Funny Architect.</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=79</wfw:commentRss>
		</item>
		<item>
		<title>&#8230; work in progress &#8230;</title>
		<link>http://thedovgals.com/andre/blog/?p=77</link>
		<comments>http://thedovgals.com/andre/blog/?p=77#comments</comments>
		<pubDate>Sat, 29 Aug 2009 17:39:57 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=77</guid>
		<description><![CDATA[Oh, Mighty Copy And Paste!
]]></description>
			<content:encoded><![CDATA[<p>Oh, Mighty Copy And Paste!</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=77</wfw:commentRss>
		</item>
		<item>
		<title>Amazing Microsoft (listview adventure)</title>
		<link>http://thedovgals.com/andre/blog/?p=72</link>
		<comments>http://thedovgals.com/andre/blog/?p=72#comments</comments>
		<pubDate>Tue, 25 Aug 2009 00:45:05 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=72</guid>
		<description><![CDATA[I have to do some wpf programming to pay my bills.  Oh, I did not say it was fun, did I?.
Microsoft keeps inventing crap.  What I&#8217;m finding now, is a) the documentation is extremely poor.  Can anyone show me, for instance, a good example of how to create a simple listview with [...]]]></description>
			<content:encoded><![CDATA[<p>I have to do some wpf programming to pay my bills.  Oh, I did not say it was fun, did I?.</p>
<p>Microsoft keeps inventing crap.  What I&#8217;m finding now, is a) the documentation is extremely poor.  Can anyone show me, for instance, a good example of how to create a simple listview with sortable columns? With some working code?</p>
<p>Never mind, I coded it.  However, b) the amazing world of Microsoft is like IBM was 50 years ago: huge and completely disorganized.</p>
<p>There were hundreds of developers in IBM (when IBM DOS then OS came out) who did not know what others were doing.  With this small list view control I discovered amazing things:</p>
<p>If you click on the scroll bar, it fires a GridViewColumnHeader.Click event.  Oh, don&#8217; tell me it&#8217;s by design&#8230; I know.  One developer designed something that completely did not match what another developer did.</p>
<p>As far as I recall, the most beautiful operating system in the world, PDP-11 RSX-11M, was developed by a team of 20 (including a janitor).  Well, when David Cutler moved to Microsoft to develop Windows NT his team was about 200 people&#8230; nobody is perfect.</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=72</wfw:commentRss>
		</item>
		<item>
		<title>Microsofts&#8217; Collective Mind</title>
		<link>http://thedovgals.com/andre/blog/?p=73</link>
		<comments>http://thedovgals.com/andre/blog/?p=73#comments</comments>
		<pubDate>Fri, 21 Aug 2009 22:27:55 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=73</guid>
		<description><![CDATA[As I mentioned before, one of my &#8212; very entertaining - projects is a migration of one humangous system from VB6 to VB.NET and WPF.  It is quite educational; and one of the things I learn is the evolution of the collective mind of Microsofts&#8217;.
During the history of former VB, its designers had been [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned before, one of my &#8212; very entertaining - projects is a migration of one humangous system from VB6 to VB.NET and WPF.  It is quite educational; and one of the things I learn is the evolution of the collective mind of Microsofts&#8217;.</p>
<p>During the history of former VB, its designers had been feeling needs for more and more empty types of data.  They invented nulls, empties, empty strings, etc.  there was a notion of nothing, ismissing, and other thingies I don&#8217;t recall now.  With .NET someone said: &#8220;Why do we need so many empty things?&#8221; And they left pretty much Nothing &#8230; and DBNull.</p>
<p>After a while, somebody (else?) realized that this was not enough.  How do you define an empty date, for instance?  And they invented Nullable.</p>
<p>When I observe this evolution, I see Microsoft as a giant ogre who survived a brain surgery.  Its memory is stochastic, its vision of the world is eclectic.  It forgets its own experience immediately.</p>
<p>Well, thanks to Microsoft we can earn our little money.</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=73</wfw:commentRss>
		</item>
		<item>
		<title>Contractors vs. Employees</title>
		<link>http://thedovgals.com/andre/blog/?p=70</link>
		<comments>http://thedovgals.com/andre/blog/?p=70#comments</comments>
		<pubDate>Tue, 28 Jul 2009 03:32:02 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=70</guid>
		<description><![CDATA[Today I had a chat with one of my customers, discussing a very old management issue, which I call &#8220;managing contractors vs. employees&#8221; for the lack of better terms.  Therefore, I have been interested in behavioral and psychological rater than money and tax aspects.  Tonight I tried to find any similar discussion in [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had a chat with one of my customers, discussing a very old management issue, which I call &#8220;managing contractors vs. employees&#8221; for the lack of better terms.  Therefore, I have been interested in behavioral and psychological rater than money and tax aspects.  Tonight I tried to find any similar discussion in Google, and - no surprise - could not find anything.</p>
<p>That&#8217;s why I decided to share with you some of my observations.</p>
<p>First of all, I am not trying to create any classification or taxonomy here.  I realize that there is an entire spectrum between these two categories of workers.  Secondly, I don&#8217;t want to suggest that all employees (contractors) possess all features described below.  However, what is true; people wearing a specific hat (whether an employee&#8217;s one or a contractor&#8217;s one) with years tend to belong to one end of the spectrum.</p>
<p>Here you go:<br />
1. Contractors sell time, employees sell skills.<br />
2. Contractors are less concerned on what they do compare to employees. A contractor can take an assignment even he does not like it (or even his/her skills don&#8217;t perfectly match) and do it.  Employees are more often becoming upset if they have to perform a task that they don&#8217;t like.<br />
3. Contractors look for a good decision.  If they have to make this decision, they tend to come up with quicker solution that is 70% perfect.  Employees are not happy with 70 or even 90%, they are looking for perfection.<br />
4. In terms of Herzberg&#8217;s theory employees are more interested in motivator factors, and contractors are more interested in the hygiene factors.  Employees can work all night on an interesting problem if there is enough pizza around, contractors won&#8217;t.<br />
5. Being quite adamant about working on tasks they like, employees hate interruption.  They aim for perfection and don&#8217;t like multitasking.  Contractors can switch their minds easily and minimal context change.<br />
6. Since employees value motivating factors more, they are usually more loyal.  Contractors are loyal for a moment.<br />
7. Employees feel very attached to the product of their work.  If one can take an example from the IT industry, employees (for example, software developers) consider programs their babies.  They feel very upset if anyone treats the babies not right or tries to kill them.  Contractors don&#8217;t give a damn: projects come, projects go.</p>
<p>Having said all that, I would like to emphasize again that I am using the &#8220;contractor&#8221; and &#8220;employee&#8221; words as terms to name the two polar groups (from the behavior point of view) and don&#8217;t mean the actual work status.</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=70</wfw:commentRss>
		</item>
		<item>
		<title>Windows Presentation Foundation</title>
		<link>http://thedovgals.com/andre/blog/?p=68</link>
		<comments>http://thedovgals.com/andre/blog/?p=68#comments</comments>
		<pubDate>Sun, 19 Jul 2009 06:24:08 +0000</pubDate>
		<dc:creator>andredovgal</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedovgals.com/andre/blog/?p=68</guid>
		<description><![CDATA[After a while I am again deeply in the coding mode.  Now it is WPF. Oh, boy. The EDI (Visual Studio 2008) is such piece of something. Microsoft did a fantastic job of taking off all good features of VS6 and VS2005 (Windows Forms).  The best way to code is to open the [...]]]></description>
			<content:encoded><![CDATA[<p>After a while I am again deeply in the coding mode.  Now it is WPF. Oh, boy. The EDI (Visual Studio 2008) is such piece of something. Microsoft did a fantastic job of taking off all good features of VS6 and VS2005 (Windows Forms).  The best way to code is to open the Notepad and code in XAML.  At least,  there is no frustration.</p>
]]></content:encoded>
			<wfw:commentRss>http://thedovgals.com/andre/blog/?feed=rss2&amp;p=68</wfw:commentRss>
		</item>
	</channel>
</rss>
