Answer the question
In order to leave comments, you need to log in
How to draw a graphic object on canvas without the help of events and other things?
I’ll make a reservation right away that reading the Microsoft documentation did not give any result, and Google gives out too outdated ways to draw something, for example, the very first question on stackoverflow contains clearly outdated information:
https://ru.stackoverflow.com/questions/794942/%D0 %...
In the "Canvas1.Children.Add" line, the Add method does not contain such an override that could accept an object of the Line class, it can only accept an object of the UIElement class, and I did not find any methods that would help draw anything in definition of this class
PS I ask you not to advise books and so on, given that even on the Internet, according to the very first results, it gives outdated methods for solving various issues - they will be of no use 0
PSS In the xaml file, there should be nothing but the canvas and the main window
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question