How to use GDI + in WPF?

I am having problems using GDI + in WPF. This was normal in WindowsForm. But in WPF, I cannot create a graphic object, following this guide , there is no Graphics class. Controls in WPF also do not have the CreateGraphics method. What should I do?

+4
source share
1 answer

WPF is not based on GDI + and generally does not use the Graphics class or similar. In general, if you draw in WPF, you will use completely different methods.

At the same time, WPF can interact with other desktop technologies such as GDI +, although, as a rule, it is less ideal for this route.

- WindowsFormsHost Windows Forms, GDI +, WPF, Windows Forms, API, , WPF.

+2

Source: https://habr.com/ru/post/1610305/


All Articles