Hi, Thank you for your vote & comment. I must admit that in my 8 years expr' in WPF i haven't used The converter's Culture parameter even once. Nevertheless, as I've insisted that my solution('bindable converter parameter') will be based on well documented, normal, Wpf's features(rather than language hacks,hidden features or workarounds).It is usually quit simply to add or modify it to fit your requirements(I've gave some samples for that). So, you're more than welcome to do so. Thanks again g. ![]() AndrewB-UK 26-Jun-13 0:25 26-Jun-13 0:25 First off, enormous thanks for (a) such a well written article, and (b) a really clever idea. But having used this for a few weeks in our application, we discovered a fairly terminal memory leak. I'm not saying this this BindableConverterParameter will always cause a leak in everybody's application; but it did in ours. Several days of testing, profiling (thanks Red Gate) and isolation narrowed it down to this. We've switched it for the approach taken by DrWPF, as recommended in Sacha Barber's comment before this. [] Again, in our profiling field tests, the DrWPF approach didn't cause a terminal leak within our application. But thanks again, it's a nice idea. And it at least opened my eyes to the possibility of a bindable converter parameter Edit: the link above is to an excellent implementation by Marlon Grech, but (I thought) based on an approach suggested by DrWPF. Apologies Marlon for not giving the right credit. Thank you very much for your complements, yet, even bigger thank for taking the time and report this bug. Your Bug report couldn't came at a better time, as i'm intending to submit an update for this article soon. I'll be very grateful if you could send me a sample code, or describe it. So i could reproduce this memory-leak and try to trace its source, and, hopefully, fix it. I can guess it might involve some substantial 'Bcb-Binded-Elements' generation & destruction.? Anyway any additional information will be appreciated. Regarding the other approaches for implementing 'Bindable-Converter-Parametr': I've actually scanned most(all? -surprisingly there are but a few) of them before i started my own, and i admit that some of them are very impressive, though i was aiming to have things that i couldn't find in any: 1. Flexibility - the ability to handle various kinds of 'binded-parameters-scenarios' with a minimal changes in code. 'xaml-readability' - getting as close as i could, to how i imagine, this kind of feature would look like, had it was implemented as a built-in-feature of the binding mechanism. Last note - regardless of the implementation, i have found 'bindable-converter-parameters' to be a very powerful and useful tool in many and different scenarios(a lot more that I've expected) Anyway, Thanks again. MultiValue Converters A Multivalue Converter is required when your target is bound to multiple sources and if the source and targets have different data formats or need some conversion. Example 1: assume you have three text box controls and one button control and you want to enable the button control when all the text of the text boxes are filled. For this case we need to use a Multivalve Converter class that inherits the IMultiValueConverter interface of the System.Windows.Data namespace that will check all the text of the textboxes to determine whether it is filled or not, if it is filled then it will return true otherwise return false and that will enable or disable the button control. ![]() C definition, the third letter of the English alphabet, a consonant. View Citigroup Inc. C investment & stock information. Get the latest Citigroup Inc. C detailed stock quotes, stock data, Real-Time ECN, charts, stats and more. C Tutorial for Beginners - Learn C programming in simple and easy steps starting from basic to advanced concepts with examples including C Overview, language basics. Black edition most nfs wanted. How can the answer be improved?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |