Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D2DControl usage #78

Open
scomx opened this issue Dec 27, 2021 · 1 comment
Open

D2DControl usage #78

scomx opened this issue Dec 27, 2021 · 1 comment

Comments

@scomx
Copy link

scomx commented Dec 27, 2021

Hi,

I am just starting to explore this library and looking for an example of proper D2DControl usage. My main question is what the best practice is for triggering OnRender? The only way I have been able to make it work is through a timer driven call that invokes Invalidate() every N milliseconds on my D2DControl derived control. This, however, results in 0 FPS with ShowFPS property enabled which makes me think I am not doing it right.

Thanks for any pointers or tips.

@agfp
Copy link

agfp commented Jul 27, 2023

If you're doing an animation, there are a lot of samples in the project.

If you're just doing some drawing, just call Invalidate() when your state changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants