-
August 1st, 2011, 01:18 PM
#1
Is there something like an "OnPaint" method in C# and Silverlight?
Is there something like an "OnPaint" method in C# and Silverlight?
Back when I was writing C++, I found that it was easy to use the OnPaint event to customize the display of a class to the screen?
Is there an equivalent in C# with Silverlight? If I want to do something when a UserControl is displayed on the screen, what method would I override?
I noticed that, in WPF, there is an OnRender method, but it seems that in C#/Silverlight, there is no "OnRender" method for a UserControl class.
-
October 7th, 2011, 08:40 PM
#2
Re: Is there something like an "OnPaint" method in C# and Silverlight?
Every UserControl/Page has a Loaded event you could use for things like that. If you're using caching, you might consider the OnNavigatedTo event of the Page.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|