SilverlightShow: Tip: How to pass a parameter to a value converter? Comments
http://www.silverlightshow.net/
Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samplesSilverlightShow.nethttp://www.rssboard.org/rss-specificationArgotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argoticen-USestoychev@completit.com (Emil Stoychev)RE: Tip: How to pass a parameter to a value converter?<div class="commentText">
<p>Hello!</p>
<p> The only thing that I can come up with is to set the fraction 1/3 as
a string "1/3" to the ConverterParameter. After that in the converter
you can easily parse the string to the desired double value. Hope that
helps!</p>
<p>Greets!</p>
</div>
http://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx#comment5053
Enraihttp://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspxFri, 10 Dec 2010 15:58:55 GMTRE: Tip: How to pass a parameter to a value converter?this is cool. Now pass me please the value "1/3" as double parameter ;)
http://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx#comment5051
serhiohttp://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspxFri, 10 Dec 2010 15:35:52 GMTRE: Tip: How to pass a parameter to a value converter?Awesome! Couldn't find how to programmatically bind and convert anywhere else... thank you!
http://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx#comment3571
wpf noobhttp://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspxMon, 10 May 2010 19:06:48 GMTRE: Tip: How to pass a parameter to a value converter?You could modify converter to expect not simple type as a value but well known for the converter interface. Interface could give all info needed for converter. In this case you don't need to bind converter parameter. See <a href="http://blog.andrew-veresov.com/post/Binding-a-Converter-Parameter.aspx">here</a> for more info.
http://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx#comment3174
andrew.veresovhttp://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspxFri, 05 Mar 2010 17:35:07 GMTRE: Tip: How to pass a parameter to a value converter?<p>It's still not possible to bind the <strong>ConverterParameter </strong>in Silverlight. But there is a possible workaround:</p>
<p>If you have a business object with for example two properties - <strong>Value </strong>and <strong>Parameter</strong>, and you want to bind to the <strong>Value</strong> and pass the <strong>Parameter </strong>to the <strong>ConverterParameter</strong>. The solution is to bind to the entire business object, so in the <strong>Convert() </strong>method of the converter you will have access to both the <strong>Value </strong>and the <strong>Parameter </strong>properties.</p>
<p>Hope this helps!</p>
<p>Greets,<br />
Martin</p>
http://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx#comment3172
Enraihttp://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspxFri, 05 Mar 2010 14:21:23 GMTRE: Tip: How to pass a parameter to a value converter?Hi i need to pass a binding value as a parameter to the converter class.. please help me in sorting this...
http://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspx#comment3171
Jeevahttp://www.silverlightshow.net/items/Tip-How-to-pass-a-parameter-to-a-value-converter.aspxFri, 05 Mar 2010 14:08:28 GMT