<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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>Comments on: WPF: GridView Column Width Calculator</title>
	<atom:link href="http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/</link>
	<description>Coding snippets, tutorials and procrastinations about C#, Java and Linux.</description>
	<lastBuildDate>Mon, 28 Jun 2010 09:06:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Echilon</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5877</link>
		<dc:creator>Echilon</dc:creator>
		<pubDate>Tue, 20 Oct 2009 09:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5877</guid>
		<description>Without looking it in depth I&#039;m not sure. I tend to use XCeed&#039;s DataGrid (free version no longer available though).</description>
		<content:encoded><![CDATA[<p>Without looking it in depth I&#8217;m not sure. I tend to use XCeed&#8217;s DataGrid (free version no longer available though).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: whuzx</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5876</link>
		<dc:creator>whuzx</dc:creator>
		<pubDate>Tue, 20 Oct 2009 08:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5876</guid>
		<description>HI
thanks for your code.
but I have a problem is that when the System.Globalization.CultureInfo  changed ,

&quot;double percentage = double.Parse(widthParam.Substring(0, widthParam.Length - 1));&quot;

will not parse correctly.if we change the current CultureInfo  to  Polish form.we could not get the respect result

how to handle this problem ?

thank you</description>
		<content:encoded><![CDATA[<p>HI<br />
thanks for your code.<br />
but I have a problem is that when the System.Globalization.CultureInfo  changed ,</p>
<p>&#8220;double percentage = double.Parse(widthParam.Substring(0, widthParam.Length &#8211; 1));&#8221;</p>
<p>will not parse correctly.if we change the current CultureInfo  to  Polish form.we could not get the respect result</p>
<p>how to handle this problem ?</p>
<p>thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Echilon</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5516</link>
		<dc:creator>Echilon</dc:creator>
		<pubDate>Wed, 22 Jul 2009 17:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5516</guid>
		<description>Thanks, that looks to be a more robust solution.</description>
		<content:encoded><![CDATA[<p>Thanks, that looks to be a more robust solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasanna</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5514</link>
		<dc:creator>Prasanna</dc:creator>
		<pubDate>Wed, 22 Jul 2009 10:20:43 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5514</guid>
		<description>Plz Check out the following link. 

http://www.ontheblog.net/CMS/Home/tabid/36/EntryID/37/Default.aspx</description>
		<content:encoded><![CDATA[<p>Plz Check out the following link. </p>
<p><a href="http://www.ontheblog.net/CMS/Home/tabid/36/EntryID/37/Default.aspx">http://www.ontheblog.net/CMS/Home/tabid/36/EntryID/37/Default.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5449</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Tue, 30 Jun 2009 14:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5449</guid>
		<description>It is possible to have this update when the GridView is resized (i.e. when the window is resized thus increasing the GridView)?</description>
		<content:encoded><![CDATA[<p>It is possible to have this update when the GridView is resized (i.e. when the window is resized thus increasing the GridView)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Echilon</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5155</link>
		<dc:creator>Echilon</dc:creator>
		<pubDate>Thu, 19 Mar 2009 12:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5155</guid>
		<description>My code is identical more or less. The header in my ListView is:
&lt;pre lang=&quot;csharp&quot;&gt;
&lt;ListView x:Name=&quot;lstResources&quot; Grid.Row=&quot;4&quot; Grid.Column=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; GridViewColumnHeader.Click=&quot;OnColumnHeaderClick&quot;
	  SelectionMode=&quot;Single&quot; ItemsSource=&quot;{Binding}&quot; SelectedValuePath=&quot;resourceid&quot;&gt;
&lt;/pre&gt;
To post code BTW, enclose it in pre tags. :)</description>
		<content:encoded><![CDATA[<p>My code is identical more or less. The header in my ListView is:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span>ListView x<span style="color: #008000;">:</span>Name<span style="color: #008000;">=</span><span style="color: #666666;">&quot;lstResources&quot;</span> Grid<span style="color: #008000;">.</span><span style="color: #0000FF;">Row</span><span style="color: #008000;">=</span><span style="color: #666666;">&quot;4&quot;</span> Grid<span style="color: #008000;">.</span><span style="color: #0000FF;">Column</span><span style="color: #008000;">=</span><span style="color: #666666;">&quot;0&quot;</span> Grid<span style="color: #008000;">.</span><span style="color: #0000FF;">ColumnSpan</span><span style="color: #008000;">=</span><span style="color: #666666;">&quot;2&quot;</span> GridViewColumnHeader<span style="color: #008000;">.</span><span style="color: #0000FF;">Click</span><span style="color: #008000;">=</span><span style="color: #666666;">&quot;OnColumnHeaderClick&quot;</span>
	  SelectionMode<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Single&quot;</span> ItemsSource<span style="color: #008000;">=</span><span style="color: #666666;">&quot;{Binding}&quot;</span> SelectedValuePath<span style="color: #008000;">=</span><span style="color: #666666;">&quot;resourceid&quot;</span><span style="color: #008000;">&gt;</span></pre></div></div>

<p>To post code BTW, enclose it in pre tags. <img src='http://www.leghumped.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michi</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5154</link>
		<dc:creator>Michi</dc:creator>
		<pubDate>Thu, 19 Mar 2009 12:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5154</guid>
		<description>ooops,

sorry but the xaml code seems to be detected as html code. here we go again(this time with [] instead):

[ListView Name=&quot;fp_userList&quot; Margin=&quot;10,0,10,10&quot; SelectionMode=&quot;Single&quot; ScrollViewer.VerticalScrollBarVisibility=&quot;Auto&quot; SelectionChanged=&quot;fp_userList_SelectionChanged&quot;]
[ListView.View]
[GridView ]
[GridViewColumn Header=&quot;User&quot; Width=&quot;{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListView}},Converter={StaticResource WidthConverter}}&quot;/]
[/GridView]
[/ListView.View]
[/ListView]</description>
		<content:encoded><![CDATA[<p>ooops,</p>
<p>sorry but the xaml code seems to be detected as html code. here we go again(this time with [] instead):</p>
<p>[ListView Name="fp_userList" Margin="10,0,10,10" SelectionMode="Single" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="fp_userList_SelectionChanged"]<br />
[ListView.View]<br />
[GridView ]<br />
[GridViewColumn Header="User" Width="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListView}},Converter={StaticResource WidthConverter}}"/]<br />
[/GridView]<br />
[/ListView.View]<br />
[/ListView]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michi</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5153</link>
		<dc:creator>Michi</dc:creator>
		<pubDate>Thu, 19 Mar 2009 12:06:34 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5153</guid>
		<description>Hey,

thanks for your response, but as &quot;value&quot; is always null, the check for null just lets the method return null after the first line...
Perhaps we didn&#039;t implement our listview in the correct way...here´s one of the listviews:









The &quot;WidthConverter&quot; Resource is also set at the beginning of the xaml file.

Do we have to set any attributes to the listview?

Thanks for your help!!!!</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>thanks for your response, but as &#8220;value&#8221; is always null, the check for null just lets the method return null after the first line&#8230;<br />
Perhaps we didn&#8217;t implement our listview in the correct way&#8230;here´s one of the listviews:</p>
<p>The &#8220;WidthConverter&#8221; Resource is also set at the beginning of the xaml file.</p>
<p>Do we have to set any attributes to the listview?</p>
<p>Thanks for your help!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Echilon</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5144</link>
		<dc:creator>Echilon</dc:creator>
		<pubDate>Wed, 18 Mar 2009 16:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5144</guid>
		<description>I didn&#039;t experience that problem, but I&#039;ve amended the sample with a check for null. Try using that. The value parameter should be the ListView, but if the Window/Control hasn&#039;t loaded yet that might cause an exception.</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t experience that problem, but I&#8217;ve amended the sample with a check for null. Try using that. The value parameter should be the ListView, but if the Window/Control hasn&#8217;t loaded yet that might cause an exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michi</title>
		<link>http://www.leghumped.com/blog/2009/03/11/wpf-gridview-column-width-calculator/comment-page-1/#comment-5143</link>
		<dc:creator>Michi</dc:creator>
		<pubDate>Wed, 18 Mar 2009 16:04:10 +0000</pubDate>
		<guid isPermaLink="false">http://leghumped.com/blog/?p=340#comment-5143</guid>
		<description>Hi,
nice code, but it doesn&#039;t work in my project.
I think i&#039;ve a problem with this line:
{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListView}}
because the variable &quot;object value&quot; in the method is always null.

Can you post a sample xaml code please?

Michi</description>
		<content:encoded><![CDATA[<p>Hi,<br />
nice code, but it doesn&#8217;t work in my project.<br />
I think i&#8217;ve a problem with this line:<br />
{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListView}}<br />
because the variable &#8220;object value&#8221; in the method is always null.</p>
<p>Can you post a sample xaml code please?</p>
<p>Michi</p>
]]></content:encoded>
	</item>
</channel>
</rss>

