<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1726712363356106904</id><updated>2024-10-02T08:36:32.456-05:00</updated><category term="wpf controltemplate datatemplate hierarchicaldatatemplate treeview"/><category term="DataGrid TextBox width expand overlap column ColumnDefinitions ColumnDefinition"/><category term="DataGridCell GenerateElement Tabbing TabStop Focusable HitTestVisible DataGrid WPF twice problem"/><category term="WPF DataGrid DataGridBoundColumn DataGridCell GenerateEditingElement PrepareCellForEdit doubleclick focus currentcell generateelement"/><category term="WPF DataGrid DataGridCell IList List F2 double-click doubleclick &quot;double click&quot; editing edit"/><category term="WPF DataGrid DataGridCell IList List F2 double-click doubleclick &quot;double click&quot; editing edit crash &quot;throws exception&quot; exception throw threw crashes crashed IEnumerable IEnumerator CollectionView"/><category term="WPF ItemsControl"/><category term="WPF TextBox shrink stretch stackpanel dockpanel horizontalalignment &quot;horizontal alignment&quot; Grid"/><category term="crash sugarsync freeze froze frozen hangs hang hanged unresponsive failed cloud"/><category term="unaligned unalign aligned column header columnheader datacells cells shift shifted CellsPanelHorizontalOffset RowHeaderActualWidth"/><title type='text'>My Daily WPF Life</title><subtitle type='html'>My daily WPF and c# problems resolved or about to ..&#xa;&#xa;Every time I face worth mentioning problems that I resolved or about to resolve. I post it here so I can return to it in the future and probably others can benefit from it.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-368354003738428618</id><published>2018-12-17T13:41:00.000-06:00</published><updated>2018-12-17T13:41:36.726-06:00</updated><title type='text'>How to modify sub-report location using Crystal Reports libraries in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I have some reports with subreports that point to invalid paths (due to some subfolders renaming). I needed to modify these subreports paths in c#.&amp;nbsp; I browsed the internet; But all what I found is unresolved questions. like:&lt;br /&gt;
&lt;a href=&quot;https://archive.sap.com/discussions/thread/3903898&quot;&gt;https://archive.sap.com/discussions/thread/3903898&lt;/a&gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;a href=&quot;https://social.msdn.microsoft.com/Forums/en-US/e116daac-7c2e-4fbc-a833-8414098a3cf3/cr-changing-subreport-path-at-runtime-or-to-relative-path-at-design-time?forum=vscrystalreports&quot;&gt;https://social.msdn.microsoft.com/Forums/en-US/e116daac-7c2e-4fbc-a833-8414098a3cf3/cr-changing-subreport-path-at-runtime-or-to-relative-path-at-design-time?forum=vscrystalreports&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Finally I came up with a solution. Unfortunately above threads were locked so I had to post it here&amp;nbsp;.&amp;nbsp; Hopefully someone can benefit from it.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #1b1c17; color: #f8f8f2; font-family: Consolas; font-size: 13;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aReportDocument&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;CrystalDecisions&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;CrystalReports&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Engine&lt;/span&gt;.&lt;span style=&quot;background: #272822; color: #66d9ef;&quot;&gt;ReportDocument&lt;/span&gt;();
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #b1ae9e;&quot;&gt;//&amp;nbsp;Fill&amp;nbsp;the&amp;nbsp;repot&amp;nbsp;path&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aReportDocument&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Load&lt;/span&gt;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rootPath&lt;/span&gt;);
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;try&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aRCD&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aReportDocument&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportClientDocument&lt;/span&gt;;
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background: #272822; color: #66d9ef;&quot;&gt;StringBuilder&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;sb&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;background: #272822; color: #66d9ef;&quot;&gt;StringBuilder&lt;/span&gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;reportDefController&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aRCD&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportDefController&lt;/span&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rptObjs&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;reportDefController&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportObjectController&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;GetAllReportObjects&lt;/span&gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;CrystalDecisions&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportAppServer&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportDefModel&lt;/span&gt;.&lt;span style=&quot;color: #66d9ef;&quot;&gt;ReportObject&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rptObj&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;in&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rptObjs&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #b1ae9e;&quot;&gt;//&amp;nbsp;look&amp;nbsp;for&amp;nbsp;sub&amp;nbsp;report&amp;nbsp;object&amp;nbsp;and&amp;nbsp;display&amp;nbsp;info&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rptObj&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Kind&lt;/span&gt;&amp;nbsp;==&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;CrystalDecisions&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportAppServer&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportDefModel&lt;/span&gt;.&lt;span style=&quot;color: #a6e22e;&quot;&gt;CrReportObjectKindEnum&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;crReportObjectKindSubreport&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;subRptObjI&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rptObj&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;CrystalDecisions&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportAppServer&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportDefModel&lt;/span&gt;.&lt;span style=&quot;color: #66d9ef;&quot;&gt;ISCRSubreportObject&lt;/span&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;location&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;subRptObjI&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;SubreportLocation&lt;/span&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Contains&lt;/span&gt;(&lt;span style=&quot;color: #e6db74;&quot;&gt;@&quot;d:\old&amp;nbsp;invalid&amp;nbsp;path\&quot;&lt;/span&gt;))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;string&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newPortion&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #e6db74;&quot;&gt;@&quot;C:\new&amp;nbsp;valid&amp;nbsp;path\&quot;&lt;/span&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;string&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newLocation&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;location&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Replace&lt;/span&gt;(&lt;span style=&quot;color: #e6db74;&quot;&gt;@&quot;d:\old&amp;nbsp;invalid&amp;nbsp;path\&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newPortion&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;sb&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;AppendLine&lt;/span&gt;(&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;\tName&amp;nbsp;:&amp;nbsp;&#39;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;subRptObjI&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Name&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&#39;&amp;nbsp;location&amp;nbsp;&#39;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;subRptObjI&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;SubreportLocation&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;&#39;&quot;&lt;/span&gt;);
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;var&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newClone&lt;/span&gt;&amp;nbsp;=&amp;nbsp;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;CrystalDecisions&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportAppServer&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportDefModel&lt;/span&gt;.&lt;span style=&quot;color: #66d9ef;&quot;&gt;ISCRSubreportObject&lt;/span&gt;)&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;subRptObjI&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Clone&lt;/span&gt;(&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;true&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newClone&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;SubreportLocation&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newLocation&lt;/span&gt;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;reportDefController&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ReportObjectController&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Modify&lt;/span&gt;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;rptObj&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newClone&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;sb&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Length&lt;/span&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;span style=&quot;color: #d684e1;&quot;&gt;0&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aReportDocument&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;SaveAs&lt;/span&gt;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newPath&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;sb&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;AppendLine&lt;/span&gt;(&lt;span style=&quot;color: #e6db74;&quot;&gt;&quot;Saved&amp;nbsp;successfully&amp;nbsp;:&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;newPath&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background: #272822; color: #66d9ef;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Write&lt;/span&gt;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;sb&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;ToString&lt;/span&gt;());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #8fda21; font-weight: bold;&quot;&gt;catch&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;background: #272822; color: #66d9ef;&quot;&gt;Exception&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;exc&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background: #272822; color: #66d9ef;&quot;&gt;Console&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;WriteLine&lt;/span&gt;(&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;exc&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Message&lt;/span&gt;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;aReportDocument&lt;/span&gt;.&lt;span style=&quot;color: #a6d2ff; font-weight: bold;&quot;&gt;Close&lt;/span&gt;();
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/368354003738428618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/368354003738428618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/368354003738428618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/368354003738428618'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2018/12/how-to-modify-sub-report-location-using.html' title='How to modify sub-report location using Crystal Reports libraries in C#'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-6587578687049484898</id><published>2015-03-22T07:55:00.000-05:00</published><updated>2015-03-22T08:05:28.772-05:00</updated><title type='text'>Panels behavior inside scrollable panels</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In a previous post I talked about a problem that exist in WPF that happens when you display a control that can expand with its content needs and can have its own scrollbars inside a ScrollViewer.&lt;br /&gt;
&lt;br /&gt;
My suggested design had a lot of limitations and restrictions. And today, I would like to revisit the problem analyze it, figure out generated issues and see if we can find a solution to resolve it:&lt;br /&gt;
&lt;br /&gt;
In order to do this analysis we need first to really understand How do panels and their children interact and talk to each other to form the final view?&lt;br /&gt;
&lt;br /&gt;
As we all know this happens in a two phase process that starts at the top of the tree and ripples to the bottom of the tree down to each child.&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Phase One: loop through all of the children of a parent/panel and give it the chance to dream of their desirable size according to suggested (by the parent) available space (set to infinity most of the time).&lt;/li&gt;
&lt;li&gt;Phase Two: loop through all of the children of a parent/panel and give them our decision regarding their wish.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Possible routes:&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;measure phase:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;available space (equals to infinity most of the time) passed down to each child.&lt;/li&gt;
&lt;li&gt;a child (Measure) would calculate its dimensions and return it back to its parent by a property called DesiredSize.&lt;/li&gt;
&lt;li&gt;a panel will determine its own final size according to all of its children&#39;s sizes&amp;nbsp;when arranged in a certain order.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;arrange phase:&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Top parent will pass down the final available space for this panel&lt;/li&gt;
&lt;li&gt;Panel will calculate each child&#39;s position and size and will pass it down to the child by calling Arrange&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The problem with ScrollViewer is that it tills its children , I am going to make all of your wishes come true. Ironically this is not a favorable solution: Why? because when a child has the ability to display its own scrollbars, it becomes meaningless when they can grow as much as they want to display their content.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
From a different point of view. A gui designer does not want to see a text box inside of a form that takes a whole lot of a space to display its content. We have other stuff to show, please behave your self and share with others available space and this is why you have scrollbars.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Semaphore : My solution is to ask your future employee what is your minimum acceptable salary and I will do my best to give you even more. And then you make a decision about it? This way, you can make better decision. Prevent your employee from going so far with their dreams. Of course this works in an ideal world like computers ! So this should be a good solution.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
How it should ideally work according to my vision to achieve a better behavior? &amp;nbsp;It should go through three phase process:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Phase One : loop through all the children and ask them what is the (Minimum) desirable size that is going to fit their content (recursively: without screwing its children&#39;s minimum sizes).&lt;/li&gt;
&lt;li&gt;Phase Two : loop through the children and tell them, this is the size that I can give to you, it can be less than what they wanted, same or even more.&lt;/li&gt;
&lt;li&gt;Phase three : the child will have to live with what is given to it , unless it was more than what it wants and can ignore given size and be as small as it wants.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/6587578687049484898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/6587578687049484898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6587578687049484898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6587578687049484898'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2015/03/panels-behavior-inside-scrollable-panels.html' title='Panels behavior inside scrollable panels'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-8450672422049615818</id><published>2014-04-28T02:45:00.001-05:00</published><updated>2014-04-28T02:45:25.021-05:00</updated><title type='text'>WPF DataGrid RowDetails eats the first click.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I have this problem where I have a panel of buttons inside my DataGrid&#39;s RowDetails. When I first open the window , I see RowDetails of the first row shown as expected but not selected.&lt;br /&gt;
&lt;br /&gt;
The symptoms : when I click on one of the buttons inside my current row&#39;s RowDetails , the DataGrid eats up the click and focuses the row instead of executing the click of the button. The second time I click on the button it works.&lt;br /&gt;
&lt;br /&gt;
The complicated explanation: when you click on any button there is an algorithm that gets executed before determining that this operation is a successful click or not. This the highlights of the algorithm.&lt;br /&gt;
1- if mouse down is received on the button&lt;br /&gt;
2- &amp;nbsp; mouse is captured&lt;br /&gt;
3- &amp;nbsp; a set of flags are set to track the operation&lt;br /&gt;
4- when the mouse is up&lt;br /&gt;
5- &amp;nbsp; the flags need to be set.&lt;br /&gt;
6- &amp;nbsp; the most important mouse status should be Captured&lt;br /&gt;
&lt;br /&gt;
now this contradicts/conflicts with some of RowDetails&#39; implementation. &amp;nbsp;Which attempts to set the RowDetails&#39; beholder row to selected. &amp;nbsp;Before doing this , it checks if the current row equals the RowDetails&#39; beholding row. But the problem is that it is doing it the wrong way. It checks the CurrentItem instead of checking the SelectedItem.&lt;br /&gt;
&lt;br /&gt;
So the simplest solution I came up with , is to sync SelectedItem with CurrentItem as follows:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base.OnPropertyChanged(e);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // to stop RowDetails from eating the first click.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (e.Property.Name == &quot;SelectedItem&quot; &amp;amp;&amp;amp; CurrentItem == null) CurrentItem = SelectedItem;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
and no&amp;nbsp;IsSynchronizedWithCurrentItem did not help resolving the problem.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/8450672422049615818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/8450672422049615818' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8450672422049615818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8450672422049615818'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2014/04/wpf-datagrid-rowdetails-eats-first-click.html' title='WPF DataGrid RowDetails eats the first click.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-3654684484505401925</id><published>2014-03-25T03:52:00.003-05:00</published><updated>2015-03-22T08:31:21.468-05:00</updated><title type='text'>Scrollable Expandable Control&#39;s problem</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;post-text&quot; style=&quot;background-color: white; border: 0px; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.804800033569336px; margin: 0px 5px 5px 0px; padding: 0px; vertical-align: baseline; width: 660px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Scrollable-expandable-controls problem.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Scrollable-expandable-controls : are controls that can stretch as its content grows and will display scrollbars when their size is restricted.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Problem appears when they are located inside another scrollable control. Child scrollable-expandable-controls will keep expanding and will count on the outer scrollable control&#39;s scrollbars.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
if you give it a maximum width or height problem will be resolved but you will need to know the size ahead and you don&#39;t have this privilege if you want a dynamic app that works well with all different screen sizes.&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
in order to achieve required behavior , we need a panel in between to allow its children (scrollable-expandable-control) to grow. Asking them to give the minimum required size and then give them the maximum size the parent provides without displaying scrollbars , currently there is no panel like this.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-text&quot; style=&quot;background-color: white; border: 0px; margin: 0px 0px 5px 5px; padding: 0px; vertical-align: baseline; width: 660px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.804800033569336px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-text&quot; style=&quot;background-color: white; border: 0px; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 13.63636302947998px; line-height: 17.804800033569336px; margin: 0px 0px 5px 5px; padding: 0px; vertical-align: baseline; width: 660px; word-wrap: break-word;&quot;&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Here is a one that I developed to provide this functionality:&lt;/div&gt;
&lt;pre class=&quot;lang-xml prettyprint prettyprinted&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; font-size: 13.63636302947998px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;    class LimitChild : System.Windows.Controls.Panel
    {
        public LimitChild()
        {
        }

        protected override Size MeasureOverride(System.Windows.Size availableSize)
        {
            System.Diagnostics.Debug.Assert(InternalChildren.Count == 1);
            System.Windows.UIElement child = InternalChildren[0];

            Size panelDesiredSize = new Size();
            // panelDesiredSize.Width = availableSize.Width;
            panelDesiredSize.Width = (double)child.GetValue(FrameworkElement.MinWidthProperty);
            panelDesiredSize.Height = (double)child.GetValue(FrameworkElement.MinHeightProperty);

            child.Measure(panelDesiredSize);

            // IMPORTANT: do not allow PositiveInfinity to be returned, that will raise an exception in the caller! 
            // PositiveInfinity might be an availableSize input; this means that the parent does not care about sizing 
            return panelDesiredSize;
        }

        protected override System.Windows.Size ArrangeOverride(System.Windows.Size finalSize)
        {
            System.Windows.UIElement child = InternalChildren[0];

            child.Arrange(new Rect(0, 0, finalSize.Width, finalSize.Height));
            if (finalSize.Width &amp;gt; child.RenderSize.Width)
                finalSize.Width = child.RenderSize.Width;
            if (finalSize.Height &amp;gt; child.RenderSize.Height)
                finalSize.Height = child.RenderSize.Height;

            return finalSize; // Returns the final Arranged size
        }
    }&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: transparent; border: 0px; clear: both; font-size: 13.63636302947998px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
and then inside your xaml surround your scrollable-expandable-control with a LimitChild panel.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/3654684484505401925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/3654684484505401925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/3654684484505401925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/3654684484505401925'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2014/03/scrollable-expandable-controls-problem.html' title='Scrollable Expandable Control&#39;s problem'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-6189531114265250322</id><published>2014-03-24T10:20:00.004-05:00</published><updated>2014-03-24T11:41:22.193-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="crash sugarsync freeze froze frozen hangs hang hanged unresponsive failed cloud"/><title type='text'>SugarSync Review</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I only tried to use it for one day, and I found all of these defects:&lt;br /&gt;
&lt;br /&gt;
the client software that I install on my computer:&lt;br /&gt;
- I cannot log off and log in in a different user name. Once you log in you are stuck.&lt;br /&gt;
- some of the folders that are shared with me by other friends , their &quot;sync to my computer&quot; toggle button is completely disabled.&lt;br /&gt;
- The folder that I managed to turn its sync-to-my-computer toggle button on, SugarSync failed to sync it. It has a 3 GB file inside it. It says that sync is successful and complete, but actually the file is not in the folder. (P.S: I tried to increase the cache up to 8 GB but did not help.)&lt;br /&gt;
- Froze several times and became unresponsive. and I had to kill it every time.&lt;br /&gt;
- crashed once.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When I tried to access the Website directly , I faced the following Problems:&lt;br /&gt;
- it claims that download was successful and I end up with a broken file.&lt;br /&gt;
- if download is interrupted, there is no resume download feature.&lt;br /&gt;
- When I download a folder , I end up with 3 or 4 of the downloaded files with 0 KB (empty files). Knowing that they are at least few 3KBs in size but still I receive them with 0 KB and status is downloaded successfully.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/6189531114265250322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/6189531114265250322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6189531114265250322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6189531114265250322'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2014/03/sugarsync-review.html' title='SugarSync Review'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-1319790134631213262</id><published>2014-03-23T00:48:00.001-05:00</published><updated>2015-03-22T12:02:22.751-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="unaligned unalign aligned column header columnheader datacells cells shift shifted CellsPanelHorizontalOffset RowHeaderActualWidth"/><title type='text'>Unaligned Column Header with Data</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I am very happy today that I solves a problem that I have been facing for a long time.&lt;br /&gt;
:-&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you have a custom control template, column headers will be shifted to the left unshowing the Select All button while the DataGrid cells manage to recognize the row header and shift correctly. Resulting in a column header that is not aligned with its corresponding cells.&lt;br /&gt;
&lt;br /&gt;
CAUSE : some people would think it is the Visibility of the select all button but this is very untrue. The truth is that Width of this button is bound to an un-updated-properly property CellsPanelHorizontalOffset . Simply put , DataGrid fails to update this property accurately , ending up with value (most of the time) equals ZERO.&lt;br /&gt;
&lt;br /&gt;
SOLUTION : bind the Select All button Width to&amp;nbsp;RowHeaderActualWidth and enjoy the magic ;-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/1319790134631213262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/1319790134631213262' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/1319790134631213262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/1319790134631213262'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2014/03/unaligned-column-header-with-data.html' title='Unaligned Column Header with Data'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-2573122492638902980</id><published>2011-10-27T09:06:00.002-05:00</published><updated>2011-10-27T09:12:01.229-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WPF ItemsControl"/><title type='text'>Don&#39;t derive from Selector</title><content type='html'>It is a base class that is used by ListBox ComboBox TabControl and others.. Why I cannot derive from it? because for some reason the designers decided to declare few critical functionality as &lt;span style=&quot;font-style: italic;&quot;&gt;internal&lt;/span&gt; . These methods were used in ListBox, ComboBox and TabControl in order to achieve their functionality but yet the designer determined to declare these methods as &lt;span style=&quot;font-style: italic;&quot;&gt;internal&lt;/span&gt; .. WHHHYYY?!!&lt;br /&gt;&lt;br /&gt;I don&#39;t have the answer.  I am deriving from ItemsControl instead.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/2573122492638902980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/2573122492638902980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/2573122492638902980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/2573122492638902980'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/10/dont-derive-from-selector.html' title='Don&#39;t derive from Selector'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-4672634213407782363</id><published>2011-09-29T14:39:00.000-05:00</published><updated>2011-09-29T16:24:07.043-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WPF DataGrid DataGridCell IList List F2 double-click doubleclick &quot;double click&quot; editing edit"/><title type='text'>Double-click on a cell in a DataGrid does not start editing the cell, while F2 works, and begins editing the cell!!!</title><content type='html'>Double-click on a cell in a DataGrid does not start editing the cell, while F2 works, and begins editing the cell!!!&lt;br /&gt;&lt;br /&gt;I worked a lot to solve this problem..  In my case, the problem was that my implementation of IList was not working properly. Specifically, the index operator &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;(this[])&lt;/span&gt; , the &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;IndexOf&lt;/span&gt; method and &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;Contains&lt;/span&gt; method.. Fix them and then double-click will work again without problems.&lt;br /&gt;&lt;br /&gt;Update: just more clarification.  In my case, I tried to make a trick to deceive the DataGrid by passing different objects everytime the DataGrid calls the this[] operator on the collection (I return a new object having properties with equal values).  But it turned out that DataGrid internally keeps a list of these objects and compare them by reference, ending up with unequal results.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/4672634213407782363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/4672634213407782363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/4672634213407782363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/4672634213407782363'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/09/double-click-on-cell-in-datagrid-does.html' title='Double-click on a cell in a DataGrid does not start editing the cell, while F2 works, and begins editing the cell!!!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-6171986551768860043</id><published>2011-09-28T11:46:00.000-05:00</published><updated>2011-09-29T15:37:51.130-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WPF DataGrid DataGridCell IList List F2 double-click doubleclick &quot;double click&quot; editing edit crash &quot;throws exception&quot; exception throw threw crashes crashed IEnumerable IEnumerator CollectionView"/><title type='text'>A custom IEnumerable implementation does not work properly with DataGrid</title><content type='html'>I am developing a DataGrid that looks at a data store that does not have  a public collection.  I implemented an IEnumerable interface for this  data-store BUT&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;the problem is&lt;/span&gt;: I am not able to  edit cells; every time I try to edit a cell I get this exception saying,  &quot;&#39;EditItem&#39; is not allowed for this view.&quot;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 204, 204);&quot;&gt;&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;You may ask, why not to create a list for your data-store and pass it to the DataGrid. The answer is: Because my data-store might get very large.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Analysis: &lt;/span&gt;I did some digging and I found that DataGrid casts &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;Items &lt;/span&gt;property (property of its grand base class: ItemsControl) it casts it to IEditableCollectionView. And here where it fails (we will talk about it later). But what is the type of &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Items &lt;/span&gt;&lt;span&gt;Property ?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;Items&lt;/span&gt; is a property of type &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;ItemCollection&lt;/span&gt; (which is a CollectionView) that is created for the Enumerable class that you assigned to ItemsSource. The collection-view is created  by calling CollectionViewSource.GetDefaultCollectionView on your Enumerable class.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The analysis&#39; results: &lt;/span&gt;DataGrid fails to create an editable CollectionView for your Enumerable class. Why? because you did not implement the correct interface for your Enumerable class.&lt;br /&gt;&lt;br /&gt;So, the question is what interfaces your collection (your Enumerable class) should implement, so that the DataGrid can create an editable collection-view for it?&lt;br /&gt;&lt;br /&gt;OK , now , it started to make sense.. I dag deeper and deeper and I  found this piece of comments inside ViewManager class in .Net framework  that clarifies the problem: (ViewManager is the creator of the collection-view for your Enumerable class that eventually will be passed to and used by Items)&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The comments say:&lt;/span&gt;&lt;br /&gt;     // Order of precendence in acquiring the View:&lt;br /&gt;     // 0) If  collection is already a CollectionView, return it.&lt;br /&gt;     // 1) If the CollectionView for this collection has been cached, then&lt;br /&gt;     //    return the cached instance.&lt;br /&gt;     // 2) If a CollectionView derived type has been passed in collectionViewType&lt;br /&gt;     //    create an instance of that Type&lt;br /&gt;     // 3) If the collection is an ICollectionViewFactory use ICVF.CreateView()&lt;br /&gt;     //    from the collection&lt;br /&gt;     // 4) If the collection is an IListSource call GetList() and perform 5),&lt;br /&gt;     //    etc. on the returned list&lt;br /&gt;     // 5) If the collection is an IBindingList return a new BindingListCollectionView&lt;br /&gt;     // 6) If the collection is an IList return a new ListCollectionView&lt;br /&gt;     // 7) If the collection is an IEnumerable, return a new CollectionView&lt;br /&gt;     //    (it uses the ListEnumerable wrapper)&lt;br /&gt;     // 8) return null&lt;br /&gt;     // An IListSource must share the view with its underlying list.&lt;br /&gt;&lt;br /&gt;     // if the view already exists, just return it&lt;br /&gt;     // Also, return null if it doesn&#39;t exist and we&#39;re called in &quot;lazy&quot; mode&lt;br /&gt;&lt;br /&gt;So , all what we need to do now is to implement one of the following interfaces  that would generate automatically one of the Collection Views that  implements IEditableCollectionView. so that your grid will work correctly.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Finally&lt;/span&gt;, I implemented IList in my Enumerable class and it worked without problems :) great ..!!&lt;br /&gt;Helpful Notes:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&lt;/span&gt; The generic version of IList&lt;t&gt; interface is not the one you should implement. You have to implement the non-gernic version of IList.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;-&lt;/span&gt; You can try, implementing ICollectionViewFactory , but you have to know it is a little bit more complicated. Because you&#39;re going to end up implementing few more interfaces in the process.&lt;br /&gt;- You can implement the IEditableObject interface for that items in your list to have more control over editing and validating each item in the list (each row in the DataGrid).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Problem solved.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Update: another complication I created .. &lt;a href=&quot;http://elashi.blogspot.com/2011/09/double-click-on-cell-in-datagrid-does.html&quot;&gt;read here about it&lt;/a&gt;&lt;br /&gt;&lt;/t&gt;</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/6171986551768860043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/6171986551768860043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6171986551768860043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6171986551768860043'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/09/custom-ienumerable-implementation-does.html' title='A custom IEnumerable implementation does not work properly with DataGrid'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-6318355803737984537</id><published>2011-09-23T11:06:00.001-05:00</published><updated>2011-09-23T16:12:05.866-05:00</updated><title type='text'>How to trace inside WPF source code !! FOUND IT..</title><content type='html'>How to trace inside WPF?  Thank God I found the solution &lt;a href=&quot;http://blogs.msdn.com/b/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx&quot;&gt;posted by &lt;span style=&quot;font-weight: bold;&quot; class=&quot;profile-usercard-hover&quot; userid=&quot;f2051465daab478e9554223e6de6b8f6&quot;&gt;Shawn Burke - MSFT&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;Thank you Shawn :)&lt;br /&gt;&lt;br /&gt;And these links too:&lt;br /&gt;&lt;a href=&quot;http://referencesource.microsoft.com/serversetup.aspx&quot;&gt;http://referencesource.microsoft.com/serversetup.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://weblogs.asp.net/rajbk/archive/2010/04/21/setting-up-visual-studio-2010-to-step-into-microsoft-net-source-code.aspx&quot;&gt;http://weblogs.asp.net/rajbk/archive/2010/04/21/setting-up-visual-studio-2010-to-step-into-microsoft-net-source-code.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If non of the above worked (... just like what happened with me..), try this one. You can download .Net Framework source code :) .. isn&#39;t this neat. Here:&lt;br /&gt;&lt;a href=&quot;http://www.codeproject.com/Articles/93423/Step-Into-NET-Framework-4-0-Source-Code&quot;&gt;http://www.codeproject.com/Articles/93423/Step-Into-NET-Framework-4-0-Source-Code&lt;/a&gt;&lt;br /&gt;Thanks Arik Poznanski :)&lt;br /&gt;&lt;br /&gt;But no.. not even this worked .. I guess I still have DLLs that do not have source code of the same version..  But hey, look at the bright side.. I have the &lt;a href=&quot;http://referencesource.microsoft.com/netframework.aspx&quot;&gt;source code&lt;/a&gt; now.. And I can use the features and tricks provided by links the above. Especially Tracing into properties and filling the Call Stack frame with external assemblies&#39; calls.. providing me with objects&#39; names and methods&#39; names. So I can look them up from the Source Code and figure out the problem that I am having.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/6318355803737984537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/6318355803737984537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6318355803737984537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6318355803737984537'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/09/how-to-trace-inside-wpf-source-code.html' title='How to trace inside WPF source code !! FOUND IT..'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-2936883915503961942</id><published>2011-09-23T10:24:00.000-05:00</published><updated>2011-09-23T16:14:15.870-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DataGridCell GenerateElement Tabbing TabStop Focusable HitTestVisible DataGrid WPF twice problem"/><title type='text'>Tabbing is misbehaving inside DataGrid with custom controls (GenerateElement)</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Context: &lt;/span&gt;I created a DataGridBoundColumn class that creates my own control.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Problem: &lt;/span&gt;tabbing between cells (that were created using the GenerateElement), causes tabbing to go through DataGridCell (the container of your generated element) then your element. So it will require the user to press TAB twice to go to the next cell.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Solution:&lt;/span&gt; The elements that you generate using GenerateElement (not edit mode cells), need to update some of its properties: &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Focusable = false,&lt;/span&gt; &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;IsHitTestVisible = false&lt;/span&gt;, and finally set its &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;IsTabStop&lt;/span&gt; to false (use this line: &lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;noeditingElement.SetValue(KeyboardNavigation.IsTabStopProperty, false);&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Conclusion: &lt;/span&gt;Elements created using GenerateElement should be NOT focusable , NOT hit visible, or tab stop disabled.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/2936883915503961942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/2936883915503961942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/2936883915503961942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/2936883915503961942'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/09/context-i-created-datagridboundcolumn.html' title='Tabbing is misbehaving inside DataGrid with custom controls (GenerateElement)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-8724998490195230613</id><published>2011-09-21T09:55:00.000-05:00</published><updated>2011-09-21T11:10:34.116-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WPF DataGrid DataGridBoundColumn DataGridCell GenerateEditingElement PrepareCellForEdit doubleclick focus currentcell generateelement"/><title type='text'>Focus is lost when GenerateEditingElement is overridden</title><content type='html'>When deriving from DataGridBoundColumn to override control creation for your DataGrid, you are going to face a problem.. Where does my focus go when I double click the cell?&lt;br /&gt;&lt;br /&gt;The cell control is created and activated but the focus just goes to the parent DataGridCell leaving the control that I just created in GenerateEditingElement unfocused.  So I will have to click a third click to get the focus where I wanted it in the first place.&lt;br /&gt;&lt;br /&gt;The solution is to override DataGridBoundColumn.PrepareCellForEdit and set the focus there. Voila.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/8724998490195230613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/8724998490195230613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8724998490195230613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8724998490195230613'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/09/focus-is-lost-when-generateeditingeleme.html' title='Focus is lost when GenerateEditingElement is overridden'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-2143732688510228089</id><published>2011-08-19T12:01:00.000-05:00</published><updated>2012-01-19T09:56:15.264-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DataGrid TextBox width expand overlap column ColumnDefinitions ColumnDefinition"/><title type='text'>GridColumn does not stop children from expanding and the column expands with the children!!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;The problem:&lt;/span&gt; So you have &lt;strike&gt;DataGrid&lt;/strike&gt; Grid with a TextBox in a column .. when the user start typing some text it will expand ignoring all parent controls and all restrictions!! What is the solution?&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;The solution is&lt;/span&gt;: use the * for the column width instead of &quot;Auto&quot; in ColumnDefinition..&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Details:&lt;/span&gt;&lt;br /&gt;
If grid column definition is set to * then it stretches to take all available space provided by parent. Yet it prevents children (and itself) from growing beyond the available space provided by parent.&lt;br /&gt;
&lt;br /&gt;
while using &quot;Auto&quot; for column width will grow as necessary (by children) regardless how much space its parent gives it and ignoring all restrictions.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/2143732688510228089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/2143732688510228089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/2143732688510228089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/2143732688510228089'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/08/gridcolumn-does-not-stop-children-from.html' title='GridColumn does not stop children from expanding and the column expands with the children!!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-5841350504470640325</id><published>2011-08-19T12:00:00.000-05:00</published><updated>2011-09-23T10:44:43.480-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="WPF TextBox shrink stretch stackpanel dockpanel horizontalalignment &quot;horizontal alignment&quot; Grid"/><title type='text'>StackPanel cannot stretch properly</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Context: &lt;/span&gt;I created a TextBox element and a button; both inside a StackPanel. And I put the StackPanel inside a Grid. I gave the StackPanel HorizontalAlignement.Stretch. And I don&#39;t want to give width to my TextBox .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Problem: &lt;/span&gt;My StackPanel is not expanding to fill the available space!!! even though I gave it Stretch for HorizontalAlignment.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Solution: &lt;/span&gt;use DockPanel.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Reasoning: &lt;/span&gt;StackPanel is designed to shrink as much as its children accept.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/5841350504470640325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/5841350504470640325' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/5841350504470640325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/5841350504470640325'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/08/stackpanel-cannot-stretch-properly.html' title='StackPanel cannot stretch properly'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-5008598823635123244</id><published>2011-04-20T11:10:00.001-05:00</published><updated>2011-04-20T15:38:49.153-05:00</updated><title type='text'>UserControl closes when focus is lost</title><content type='html'>I have a UserControl that I want it to close when focus is lost from it completely. Knowing that it has few children elements: TextBox and few buttons.&lt;br /&gt;&lt;br /&gt;Obstacles:&lt;br /&gt;- if I click on button on this UserControl , it loses the focus immediately.&lt;br /&gt;So any attempt to handle lost focus to close the control will cause the control to close every time you click any button on it.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SOLUTION: do not use IsFocusScope unless the control is toolbar or menu (that should not maintain focus. Otherwise focus will keep returning to the first control of a non-IsFocusScope-host when you press any button on this IsFocusScope-host.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/5008598823635123244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/5008598823635123244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/5008598823635123244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/5008598823635123244'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/04/usercontrol-closes-when-focus-is-lost.html' title='UserControl closes when focus is lost'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-3982732096808251733</id><published>2011-03-16T15:10:00.001-05:00</published><updated>2011-09-23T16:16:34.050-05:00</updated><title type='text'>I am not receiving Clicks in the blank area of a StackPanel</title><content type='html'>I created a panel with two controls in it: textblock and image. But the panel only accepts clicks or mouse over the text and the image but any blank area around them in the panel is ignored.&lt;br /&gt;&lt;br /&gt;Solution: change your panel&#39;s background to Transparent. This way you will keep your panel transparent and force receiving mouse events on your panel.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/3982732096808251733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/3982732096808251733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/3982732096808251733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/3982732096808251733'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/03/wpf-accept-clicks-only-on-text-or-image.html' title='I am not receiving Clicks in the blank area of a StackPanel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-8990649237783006464</id><published>2011-03-16T14:41:00.000-05:00</published><updated>2011-03-16T15:09:59.072-05:00</updated><title type='text'>WPF: define attached property or dependency property</title><content type='html'>When to define dependency property and when to define attached property.&lt;br /&gt;&lt;br /&gt;- Define attached property, if you want to give your user the ability to default this property to a control and to all of its descendents as well.&lt;br /&gt;- Define attached property, when you want all different kinds of controls to have the capability to carry this property with them. May be because they could be children of your control/panel so you give them the ability to assign this property so they can participate in deciding how to be laid in your panel.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/8990649237783006464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/8990649237783006464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8990649237783006464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8990649237783006464'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/03/wpf-define-attached-property-or.html' title='WPF: define attached property or dependency property'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-6280278495338625784</id><published>2011-03-16T14:36:00.001-05:00</published><updated>2011-03-24T15:48:35.968-05:00</updated><title type='text'>WPF: User Control vs Custom Control</title><content type='html'>When to use User Control and when to use Custom Control.  Simply:&lt;br /&gt;&lt;br /&gt;Use Custom Control if:&lt;br /&gt;- If you want to override a control to expand its functionality or restrict it, like TextBox or Button&lt;br /&gt;- If you want your clients to be able to create different ControlTemplate for your control.&lt;br /&gt;&lt;br /&gt;Use User Control if&lt;br /&gt;- you want to create a composite of controls to give group of functionality all together.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/6280278495338625784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/6280278495338625784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6280278495338625784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/6280278495338625784'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/03/wpf-user-control-vs-custom-control.html' title='WPF: User Control vs Custom Control'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-7818522196633377360</id><published>2011-02-14T14:55:00.000-06:00</published><updated>2011-02-14T15:29:54.802-06:00</updated><title type='text'>Shared Resources</title><content type='html'>Shared resources are very useful and  good saving strategy but it might cause you troubles if you don&#39;t pay attention.  Changing a shared resource in one place will change all other places where it is used..&lt;br /&gt;&lt;br /&gt;Ok this is easy and obvious but what is not obvious is that all of your resources are shared by default. Watch out. ;)</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/7818522196633377360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/7818522196633377360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/7818522196633377360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/7818522196633377360'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/02/shared-resources.html' title='Shared Resources'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-3864060936382817566</id><published>2011-02-10T12:48:00.000-06:00</published><updated>2011-02-15T08:42:59.671-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wpf controltemplate datatemplate hierarchicaldatatemplate treeview"/><title type='text'>ControlTemplate vs DataTemplate</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;When to use ControlTemplate and when to use DataTemplate/HierarchicalDataTemplate&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Quick Answer:&lt;/span&gt;&lt;br /&gt;- ControlTemplate is used to replace the whole visual tree of a control.&lt;br /&gt;- DataTemplate/HierarchicalDataTemplate: is used only to replace the content of a control.&lt;br /&gt;Example at the bottom will clarify more.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Features of each one of them:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ControlTemplate:&lt;/span&gt;&lt;br /&gt;- you can use template-binding to bind some of the elements&#39; properties defined in your template with the templated control&#39;s properties. Like to bind a rectangle&#39;s color in your template with the templated control&#39;s background color.&lt;br /&gt;- you can use ContentPresenter to display  the templated control&#39;s Content somewhere in your ControlTemplate (in case your templated control is ContentControl control).&lt;br /&gt;- and you can use ItemsPresenter to display the templated control&#39;s items in case your templated control is ItemsControl control.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;DataTemplate/HierarchicalDataTemplate: &lt;/span&gt;&lt;br /&gt;- you can bind the elements you defined in your DataTemplate with properties of your corresponding Data (not control&#39;s property) classes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Example&lt;/span&gt;:&lt;br /&gt;if you have  TreeView control and you have TreeViewItem(s)  in it. The TreeViewItem is going to have some GUI in it to display the  following:&lt;br /&gt;- plus/minus button.&lt;br /&gt;- border.&lt;br /&gt;- place to display the header of the item, may be text block.&lt;br /&gt;- place to display the child items of  it, may be a stack.&lt;br /&gt;&lt;br /&gt; if you use DataTemplate/HierarchicalDataTemplate, you only need to worry about displaying the text block (Content); so you don&#39;t have to worry about the plus/minus button nor to worry about the child items.&lt;br /&gt;&lt;br /&gt; On the other hand, if you use ControlTemplate for this TreeViewItem, you will have to draw the plus/minus button and where to display the textblock (ContentPresenter) and where to display the child items (ItemsPresenter). and then you can add your own decorations around them.&lt;br /&gt;&lt;br /&gt;I will keep updating this post as necessary. Please, let me know what you think and if you have any questions or concerns.</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/3864060936382817566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/3864060936382817566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/3864060936382817566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/3864060936382817566'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/02/controltemplate-vs-datatemplate.html' title='ControlTemplate vs DataTemplate'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-4422807189073890748</id><published>2011-02-09T14:12:00.001-06:00</published><updated>2011-09-23T10:49:43.841-05:00</updated><title type='text'>Control Template Named Parts in WPF</title><content type='html'>An important thing to remember and very nice to use: Control template named parts. Why and How?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Why this feature is important?&lt;/span&gt; because some controls that you create a ControlTemplate for, expect your ControlTemplate to have some elements in it that are necessary to the control&#39;s functionality.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;How this feature is used?&lt;/span&gt; the templated control assumes that the template created for this control has some named elements. The templated control later, tries to access them and their functionality using the assumed names. So if you decided to create control template for such a control, you will need to add these required elements and give them the names that are expected by the templated control.&lt;br /&gt;&lt;br /&gt;Unfortunately, most of the time named parts are not documented (Read the &lt;span style=&quot;font-weight: bold;&quot;&gt;Update&lt;/span&gt; at the bottom please). &lt;span style=&quot;font-weight: bold;&quot;&gt;How to identify them?&lt;/span&gt; you can use &lt;a href=&quot;http://snoopwpf.codeplex.com/&quot;&gt;snoop&lt;/a&gt;, very simple: run your wpf application, run snoop, use snoop to browse your wpf application and inspect the visual tree of the desired control.  The standard way to name these parts is by adding a prefix &quot;PART_&quot;.&lt;br /&gt;&lt;br /&gt;Or you develop your own snoop-like-app as suggested by Christopher Bennage in the following article:&lt;br /&gt;Nice and short article: &lt;a href=&quot;http://devlicious.com/blogs/christopher_bennage/archive/2008/03/09/identifying-control-templates-parts-in-wpf.aspx&quot;&gt;Identifying Control Templates Parts in WPF, by Christopher Bennage&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I hope this helps&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;UPDATE : Microsoft now provides the names on &lt;/span&gt;&lt;a style=&quot;font-weight: bold;&quot; href=&quot;http://msdn.microsoft.com/en-us/library/cc278075%28v=vs.95%29.aspx&quot;&gt;this link&lt;/a&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/4422807189073890748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/4422807189073890748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/4422807189073890748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/4422807189073890748'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/02/named-control-templates-parts-in-wpf.html' title='Control Template Named Parts in WPF'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1726712363356106904.post-8750222824418526137</id><published>2011-02-09T12:46:00.000-06:00</published><updated>2011-02-09T15:13:26.134-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wpf controltemplate datatemplate hierarchicaldatatemplate treeview"/><title type='text'>HierarchicalDataTemplate not finding the specified ItemsSource</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I had problem, today. My HierarchicalDataTemplate did not find the collection specified in its ItemsSource property. Well, the collection was there but the problem was that the collection was a data member; it should be a property. Case is closed&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elashi.blogspot.com/feeds/8750222824418526137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1726712363356106904/8750222824418526137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8750222824418526137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1726712363356106904/posts/default/8750222824418526137'/><link rel='alternate' type='text/html' href='http://elashi.blogspot.com/2011/02/hierarchicaldatatemplate-not-finding.html' title='HierarchicalDataTemplate not finding the specified ItemsSource'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01859344438265567561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>