﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - Automated text length limit with UXTextBox and DevForce</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Automated-text-length-limit-with-UXTextBox-and-DevForce/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Automated text length limit with UXTextBox and DevForce</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Automated-text-length-limit-with-UXTextBox-and-DevForce/</link><pubDate>Wed, 15 Aug 2012 22:00:44 GMT</pubDate><dc:creator>yudi</dc:creator><category>UXTextBox DevForce Validation</category><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I’m sorry for I forgot to insert the link in my previous post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;Please try to check the discussion in &lt;a href="http://stackoverflow.com/questions/5664982/maxlength-in-wpf-textbox-from-column-property-in-dataset"&gt;here&lt;/a&gt; and &lt;a href="http://www.codeproject.com/Articles/17332/Dynamically-set-TextBox-MaxLength-based-on-SQL-col"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Automated text length limit with UXTextBox and DevForce</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Automated-text-length-limit-with-UXTextBox-and-DevForce/</link><pubDate>Tue, 14 Aug 2012 19:28:16 GMT</pubDate><dc:creator>harald</dc:creator><category>UXTextBox DevForce Validation</category><description>&lt;p&gt;Thanks for your swift response, Yudi.&lt;br /&gt;&lt;br /&gt;I implemented a value converter yesterday (using reflection to obtain the max string length attribute). It was fairly easy and it is a much more versatile solution as it can be used anywhere in xaml.&lt;br /&gt;&lt;br /&gt;Creating a max length property for every property of my entities is not a convenient solution as there can be many of them. It also raises the question how they would get updated &lt;span style="text-decoration: underline;"&gt;automatically&lt;/span&gt; if and when the entity model gets updated and the max strings lengths change. Doing this manually is too inconvenient and error prone.&lt;br /&gt;&lt;br /&gt;Nevertheless, you said "&lt;span style="color: rgb(31, 73, 125);"&gt;I found an interesting discussion in here"&lt;/span&gt; and I'd be interested to hear other's thoughts on the issue. Could you pls specify (with a link maybe) where exactly "in here" is?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Automated text length limit with UXTextBox and DevForce</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Automated-text-length-limit-with-UXTextBox-and-DevForce/</link><pubDate>Tue, 14 Aug 2012 03:08:55 GMT</pubDate><dc:creator>yudi</dc:creator><category>UXTextBox DevForce Validation</category><description>&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;As for me I’d prefer the first option, to use a converter and bind it to the MaxLength property of UXTextBox, since this one is more feasible to be implemented.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;I found an interesting discussion in here. The idea is to store the MaxLength as a property in ViewModel and then set the cell’s MaxLength property through the column’s EditingElementStyle.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(31, 73, 125);"&gt;If any other members who had good ideas for this topic, please feel free to leave a comment and let us hear your feedback.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Automated text length limit with UXTextBox and DevForce</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Automated-text-length-limit-with-UXTextBox-and-DevForce/</link><pubDate>Mon, 13 Aug 2012 19:54:59 GMT</pubDate><dc:creator>harald</dc:creator><category>UXTextBox DevForce Validation</category><description>&lt;p&gt;We are using Intersoft UI in combination with the DevForce entity framwork.&lt;/p&gt;
&lt;p&gt;We are trying to find an easy to use solution for the following everyday problem:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;We use UXTextBoxes to receive text input. We need an easy way to set the MaxLength property according to the maximum length of the binding entity field (from DevForce entity framework) the UXTextBox is bound to.&lt;/p&gt;
&lt;p&gt;We have come up with two possible solutions:&lt;/p&gt;
&lt;p&gt;1. write a value converter that receives as input the property in question and (using reflection) returns the maximum length of the text field. This converter can then be used in the binding to the MaxLength property.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;2. Derive our own TextBox class from UXTextBox and set the MaxLength property automatically and dependent on the binding in the code of the class.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Both are possible solutions, but given the fact that those are everyday problems for any DB UI developer we are hoping that you have a much simpler, i.e. less verbose and labor intensive solution.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>