I've tried:
(UIElement)'myString'
But it gives me:
Cannot convert type 'string' to 'System.Windows.UIElement'
So, how do I type cast from string to UIElement?
Rainer Engblom
Rainer
It was FindName('myString') as UIElement;
>> On Thursday, January 10, 2008 8:37 AM RainerEngblo wrote:
>> Actually, type casting is probably not possible, but is there a method of
>> finding an UIElement, when I have it is name as a string.
>>
>> Rainer
>>
>>
>> "Rainer Engblom" wrote:
>>> On Thursday, January 10, 2008 8:44 AM RainerEngblo wrote:
>>> Heh, it helps to post here, I found the solution immediately.
>>>
>>> It was FindName('myString') as UIElement;
>>>
>>>
>>>
>>>
>>> "Rainer Engblom" wrote:
>>> Submitted via EggHeadCafe - Software Developer Portal of Choice
>>> Win a free Professional license of CodeSmith Generator 5.2!
>>> http://www.eggheadcafe.com/tutorials/aspnet/32aeed64-8518-4bd0-9614-e82b5d3ab3a4/win-a-free-professional-license-of-codesmith-generator-52.aspx