Microsoft
Software
Hardware
Network
Question : How can I find a UIElement on a WPF application
Hi,
I have a number of Ellipses on the main interface to a WPF application.
I would like to change the properties of these programmatically, but I want to reference them by name (otherwise the code will be huge!!)
I would like something like this:
1:
Ellipse mine = (Ellipse) UIElements.Find["ellipse12"];
I know this is not the correct syntax, but is this approach possible???
Any help would be appreciated.
Best regards,
James
Answer : How can I find a UIElement on a WPF application
It's all correct till it's works :P
But in case of your code you can easily get null, especialy with dynamicly created objects. VisualTreeHelper handles most common errors and FindName is failsafe and requires sainty checks.
Random Solutions
Websense - Block Internet Access - Except for Updates
which is the best editor for oracle ?
Problems moving L2L IPSec VPN from Cisco PIX to Cisco ASA 5520, connecting from Cisco 877
Add Mirror Greyed Out
RWW Screen Resolution
can#t Compile PNG Image Lib
How to get an USB speaker to work with Eee PC 900 Xandros Linux
Uplink fast set on a distribution layer switch
how to truncate the transaction logs in exchange 2010 after NT backup
qmail ,mutt problem: Error sending message, child exited 127 (Exec error.).