<?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 for </title>
	<atom:link href="http://www.benbarefield.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benbarefield.com/blog</link>
	<description>Ben Barefield&#039;s buzzing brain</description>
	<lastBuildDate>Mon, 20 May 2013 07:50:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>Comment on Bindable DataGrid Columns by Ben</title>
		<link>http://www.benbarefield.com/blog/2011/03/09/bindable-datagrid-columns/comment-page-1/#comment-2060</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 20 May 2013 07:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=51#comment-2060</guid>
		<description><![CDATA[Your XAML didn&#039;t show up, but I think what you&#039;re trying to do is bind a TextBlock you have defined in a template to a property on a class that is located at the path specified by ColumnBindingPath.
I&#039;m guessing the issue is that you need to specify where the property is on your TextBlock&#039;s binding, so I think you should be able to do something like:
{Binding (FrameworkElement.DataContext).&lt;PropertyName&gt;}
It&#039;s been a long time since I&#039;ve used this and I don&#039;t have great means to support it right now, but I think something like that should work since the code adds a DataContext to DataGridColumn.]]></description>
		<content:encoded><![CDATA[<p>Your XAML didn&#8217;t show up, but I think what you&#8217;re trying to do is bind a TextBlock you have defined in a template to a property on a class that is located at the path specified by ColumnBindingPath.<br />
I&#8217;m guessing the issue is that you need to specify where the property is on your TextBlock&#8217;s binding, so I think you should be able to do something like:<br />
{Binding (FrameworkElement.DataContext).
<propertyname>}<br />
It&#8217;s been a long time since I&#8217;ve used this and I don&#8217;t have great means to support it right now, but I think something like that should work since the code adds a DataContext to DataGridColumn.</propertyname>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bindable DataGrid Columns by wojo</title>
		<link>http://www.benbarefield.com/blog/2011/03/09/bindable-datagrid-columns/comment-page-1/#comment-2059</link>
		<dc:creator>wojo</dc:creator>
		<pubDate>Mon, 20 May 2013 07:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=51#comment-2059</guid>
		<description><![CDATA[Hi, Still have a little problem with that :( . Here is my XAML
&lt;code&gt;

                    
                        
                            
                                                               
                                                      
                            
                                
                                    
                                
                            
                        
                    
                 
&lt;/code&gt;

... and DataGridColumnsSettings class:

&lt;code&gt;
 public class DataGridColumnSettings : FrameworkElement
    {
        public static readonly DependencyProperty ColumnBindingPathProperty = DependencyProperty.Register(
            &quot;ColumnBindingPath&quot;,
            typeof(string),
            typeof(DataGridColumnSettings),
            new PropertyMetadata(null, ColumnBindingPathChanged));
        public string ColumnBindingPath
        {
            get { return GetValue(ColumnBindingPathProperty) as string; }
            set { SetValue(ColumnBindingPathProperty, value); }
        }
        private static void ColumnBindingPathChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var target = d as DataGridColumnSettings;
            if (target == null)
                return;

            //Binding property not exist for DataGridTemplateColumn ....
            //target.column.Binding = new Binding(e.NewValue as string);
        }

        public static readonly DependencyProperty CellTemplateProperty = DependencyProperty.Register(
        &quot;CellTemplate&quot;,
        typeof(DataTemplate),
        typeof(DataGridColumnSettings),
        new PropertyMetadata(null, CellTemplateChanged));
        public DataTemplate CellTemplate
        {
            get { return GetValue(CellTemplateProperty) as DataTemplate; }
            set { SetValue(CellTemplateProperty, value); }
        }

        private static void CellTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var target = d as DataGridColumnSettings;
            if (target == null)
                return;

            // Maybe some code here ??
        }

        public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(
             &quot;Header&quot;,
             typeof(object),
             typeof(DataGridColumnSettings));
        public object Header
        {
            get { return GetValue(HeaderProperty); }
            set { SetValue(HeaderProperty, value); }
        }

        private DataGridTemplateColumn column;
        private object viewModel;


        public void Setup(DataGridTemplateColumn column, object columnViewModel)
        {
            this.column = column;
            viewModel = columnViewModel;
            this.DataContext = columnViewModel;

            if (Header is FrameworkElement)
            {
                (Header as FrameworkElement).DataContext = columnViewModel;
                column.Header = Header;
            }
            else
                BindingOperations.SetBinding(column, DataGridColumn.HeaderProperty, new Binding(&quot;Header&quot;) { Source = this });

            //Binding property not exist for DataGridTemplateColumn ....
            //column.Binding = new Binding(ColumnBindingPath);        
   
            //My changes :-)
            column.CellTemplate = CellTemplate;

        }
    }

&lt;/code&gt;

In Your DataGridColumns class i changed only DataGridTextColumn to DataGridTemplateColumn.
The problem is - i can&#039;t bind my TextBlock in CellTemplate with ColumnBindingPath property. Help me please ...]]></description>
		<content:encoded><![CDATA[<p>Hi, Still have a little problem with that <img src='http://www.benbarefield.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  . Here is my XAML<br />
<code></p>
<p></code></p>
<p>&#8230; and DataGridColumnsSettings class:</p>
<p><code><br />
 public class DataGridColumnSettings : FrameworkElement<br />
    {<br />
        public static readonly DependencyProperty ColumnBindingPathProperty = DependencyProperty.Register(<br />
            "ColumnBindingPath",<br />
            typeof(string),<br />
            typeof(DataGridColumnSettings),<br />
            new PropertyMetadata(null, ColumnBindingPathChanged));<br />
        public string ColumnBindingPath<br />
        {<br />
            get { return GetValue(ColumnBindingPathProperty) as string; }<br />
            set { SetValue(ColumnBindingPathProperty, value); }<br />
        }<br />
        private static void ColumnBindingPathChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br />
        {<br />
            var target = d as DataGridColumnSettings;<br />
            if (target == null)<br />
                return;</p>
<p>            //Binding property not exist for DataGridTemplateColumn ....<br />
            //target.column.Binding = new Binding(e.NewValue as string);<br />
        }</p>
<p>        public static readonly DependencyProperty CellTemplateProperty = DependencyProperty.Register(<br />
        "CellTemplate",<br />
        typeof(DataTemplate),<br />
        typeof(DataGridColumnSettings),<br />
        new PropertyMetadata(null, CellTemplateChanged));<br />
        public DataTemplate CellTemplate<br />
        {<br />
            get { return GetValue(CellTemplateProperty) as DataTemplate; }<br />
            set { SetValue(CellTemplateProperty, value); }<br />
        }</p>
<p>        private static void CellTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br />
        {<br />
            var target = d as DataGridColumnSettings;<br />
            if (target == null)<br />
                return;</p>
<p>            // Maybe some code here ??<br />
        }</p>
<p>        public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register(<br />
             "Header",<br />
             typeof(object),<br />
             typeof(DataGridColumnSettings));<br />
        public object Header<br />
        {<br />
            get { return GetValue(HeaderProperty); }<br />
            set { SetValue(HeaderProperty, value); }<br />
        }</p>
<p>        private DataGridTemplateColumn column;<br />
        private object viewModel;</p>
<p>        public void Setup(DataGridTemplateColumn column, object columnViewModel)<br />
        {<br />
            this.column = column;<br />
            viewModel = columnViewModel;<br />
            this.DataContext = columnViewModel;</p>
<p>            if (Header is FrameworkElement)<br />
            {<br />
                (Header as FrameworkElement).DataContext = columnViewModel;<br />
                column.Header = Header;<br />
            }<br />
            else<br />
                BindingOperations.SetBinding(column, DataGridColumn.HeaderProperty, new Binding("Header") { Source = this });</p>
<p>            //Binding property not exist for DataGridTemplateColumn ....<br />
            //column.Binding = new Binding(ColumnBindingPath);        </p>
<p>            //My changes <img src='http://www.benbarefield.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
            column.CellTemplate = CellTemplate;</p>
<p>        }<br />
    }</p>
<p></code></p>
<p>In Your DataGridColumns class i changed only DataGridTextColumn to DataGridTemplateColumn.<br />
The problem is &#8211; i can&#8217;t bind my TextBlock in CellTemplate with ColumnBindingPath property. Help me please &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bindable DataGrid Columns by Ben</title>
		<link>http://www.benbarefield.com/blog/2011/03/09/bindable-datagrid-columns/comment-page-1/#comment-2058</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sun, 19 May 2013 23:50:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=51#comment-2058</guid>
		<description><![CDATA[There are various ways to approach this, the easiest would be to add two more dependency properties: one to take a cell template and one for the editing template. Then if those exist, create DataGridTemplateColumn instead of DataGridTextColumn when filling the DataGrid. These would look very similar to some of the code that is already written in there, so it should be easy to copy/paste/modify. There&#039;s more that could be done to test type, and I&#039;m sure you could expand it out so that you could create multiple templates in the DataGrid for multiple types being displayed.]]></description>
		<content:encoded><![CDATA[<p>There are various ways to approach this, the easiest would be to add two more dependency properties: one to take a cell template and one for the editing template. Then if those exist, create DataGridTemplateColumn instead of DataGridTextColumn when filling the DataGrid. These would look very similar to some of the code that is already written in there, so it should be easy to copy/paste/modify. There&#8217;s more that could be done to test type, and I&#8217;m sure you could expand it out so that you could create multiple templates in the DataGrid for multiple types being displayed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bindable DataGrid Columns by wojo</title>
		<link>http://www.benbarefield.com/blog/2011/03/09/bindable-datagrid-columns/comment-page-1/#comment-2057</link>
		<dc:creator>wojo</dc:creator>
		<pubDate>Sat, 18 May 2013 07:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=51#comment-2057</guid>
		<description><![CDATA[Hi, Nice approach. How should i modify your code to create DataGridTemplateColumn with CellTemplate and CellEditingTemplate. Thanks for answer :-)]]></description>
		<content:encoded><![CDATA[<p>Hi, Nice approach. How should i modify your code to create DataGridTemplateColumn with CellTemplate and CellEditingTemplate. Thanks for answer <img src='http://www.benbarefield.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Road Trippin&#8217; by Marilyn Dykstra</title>
		<link>http://www.benbarefield.com/blog/2013/01/07/road-trippin/comment-page-1/#comment-1948</link>
		<dc:creator>Marilyn Dykstra</dc:creator>
		<pubDate>Fri, 26 Apr 2013 17:27:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=300#comment-1948</guid>
		<description><![CDATA[Hi Ben - 
I work with your mom, Diane, at Haworth and she passed your blog site on to me.  I&#039;ve just started reading and is quite interesting.  We&#039;re leaving Saturday for 3 weeks in AU/NZ.  We&#039;ll be in Sydney staying right near Darling Harbor Mon-Fri, May 6-10.  
Just wondering if you have any suggestions for the Top 10 things to do in Sydney :)
The 2nd week we&#039;re going to Palm Cove near Cairns, and then the 3rd week on the South Island in New Zealand.  There&#039;s 4 of us traveling - my husband Tom &amp; I, and 2 of his friends.  If you &amp; Adrienne are up for meeting us for dinner next week one night, let us know - our treat!  We&#039;d love to hear your stories and any suggestions you have for us.  You can email me at the haworth email, I should have access to it.  Cheers!  
Marilyn &amp; Tom Dykstra]]></description>
		<content:encoded><![CDATA[<p>Hi Ben &#8211;<br />
I work with your mom, Diane, at Haworth and she passed your blog site on to me.  I&#8217;ve just started reading and is quite interesting.  We&#8217;re leaving Saturday for 3 weeks in AU/NZ.  We&#8217;ll be in Sydney staying right near Darling Harbor Mon-Fri, May 6-10.<br />
Just wondering if you have any suggestions for the Top 10 things to do in Sydney <img src='http://www.benbarefield.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The 2nd week we&#8217;re going to Palm Cove near Cairns, and then the 3rd week on the South Island in New Zealand.  There&#8217;s 4 of us traveling &#8211; my husband Tom &amp; I, and 2 of his friends.  If you &amp; Adrienne are up for meeting us for dinner next week one night, let us know &#8211; our treat!  We&#8217;d love to hear your stories and any suggestions you have for us.  You can email me at the haworth email, I should have access to it.  Cheers!<br />
Marilyn &amp; Tom Dykstra</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WPF LL: TextBoxes that just keep growing by tronious</title>
		<link>http://www.benbarefield.com/blog/2010/05/24/wpf-ll-textboxes-that-just-keep-growing/comment-page-1/#comment-1912</link>
		<dc:creator>tronious</dc:creator>
		<pubDate>Thu, 11 Apr 2013 21:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=27#comment-1912</guid>
		<description><![CDATA[Excellent.  I too was stuck on this.  Sometimes the layout system in WPF can be a pain.

This especially helped me:
&quot;FYI, this ‘Disabled’ trick is also required when using DataTemplates inside a ListBox. The ListBox defaults to ScrollViewer.HorizontalScrollBarVisibility=”Auto”&quot;

Very unintuitive how a scrollbar&#039;s visibility should effect whether or not a textbox that&#039;s part of a datatemplate grows but whatever lol.

Thanks again.]]></description>
		<content:encoded><![CDATA[<p>Excellent.  I too was stuck on this.  Sometimes the layout system in WPF can be a pain.</p>
<p>This especially helped me:<br />
&#8220;FYI, this ‘Disabled’ trick is also required when using DataTemplates inside a ListBox. The ListBox defaults to ScrollViewer.HorizontalScrollBarVisibility=”Auto”&#8221;</p>
<p>Very unintuitive how a scrollbar&#8217;s visibility should effect whether or not a textbox that&#8217;s part of a datatemplate grows but whatever lol.</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creepy Crawlies by Christin</title>
		<link>http://www.benbarefield.com/blog/2012/12/21/creepy-crawlies/comment-page-1/#comment-1911</link>
		<dc:creator>Christin</dc:creator>
		<pubDate>Sun, 24 Mar 2013 02:07:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=288#comment-1911</guid>
		<description><![CDATA[It&#039;s been three months since I read this.  Wanted you to know that not once, since then, have I failed to quiver when reaching for the car sun visor.]]></description>
		<content:encoded><![CDATA[<p>It&#8217;s been three months since I read this.  Wanted you to know that not once, since then, have I failed to quiver when reaching for the car sun visor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ribbon Tab Definition on UserControl by Ben</title>
		<link>http://www.benbarefield.com/blog/2011/03/04/ribbon-tab-definition-on-usercontrol/comment-page-1/#comment-1907</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 31 Jan 2013 22:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=40#comment-1907</guid>
		<description><![CDATA[Glad to have helped!]]></description>
		<content:encoded><![CDATA[<p>Glad to have helped!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ribbon Tab Definition on UserControl by Maximilian Holder</title>
		<link>http://www.benbarefield.com/blog/2011/03/04/ribbon-tab-definition-on-usercontrol/comment-page-1/#comment-1906</link>
		<dc:creator>Maximilian Holder</dc:creator>
		<pubDate>Thu, 31 Jan 2013 09:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=40#comment-1906</guid>
		<description><![CDATA[Hello,

great article!
I modified the code for the Fluent Ribbon Suite, works great!
I also added one functionality to add a ContextualTab Group via this Markup Extension.

My UI has as main Content a TabControl which stores different views as Tabs (Each View is based on a UserControl). 
Some Views need an extra Ribbon Tab (and maybe a Context Group), if I click on one Tab, the Ribbon Tab shows up too :)
Same with closing..

Regards,
Maximilian Holder]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>great article!<br />
I modified the code for the Fluent Ribbon Suite, works great!<br />
I also added one functionality to add a ContextualTab Group via this Markup Extension.</p>
<p>My UI has as main Content a TabControl which stores different views as Tabs (Each View is based on a UserControl).<br />
Some Views need an extra Ribbon Tab (and maybe a Context Group), if I click on one Tab, the Ribbon Tab shows up too <img src='http://www.benbarefield.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Same with closing..</p>
<p>Regards,<br />
Maximilian Holder</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Calling Scala from C# by Ben</title>
		<link>http://www.benbarefield.com/blog/2011/07/27/calling-scala-from-c/comment-page-1/#comment-1901</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 14 Jan 2013 22:30:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarefield.com/blog/?p=76#comment-1901</guid>
		<description><![CDATA[Cool, glad you figured this out! It&#039;s been a while since I&#039;ve done any .Net work in Visual Studio and even longer since I&#039;ve looked at Scala.Net.]]></description>
		<content:encoded><![CDATA[<p>Cool, glad you figured this out! It&#8217;s been a while since I&#8217;ve done any .Net work in Visual Studio and even longer since I&#8217;ve looked at Scala.Net.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
