Good day. I am developing a small program for creating embroidery mockups from images. All algorithms have already been worked out. Everything works with the palette of threads, etc. Here is a rough result without setting:
Now the question arose of putting marks in the cells to distinguish the threads (as is usually done in such layouts). Initially, they were applied by the same Graphics that created the template. But there were two problems:
- To fit a character in a cage, you need to increase the image at times - time, performance and memory suffer.
- With the minimum image size required for character readability, the layout looks soap. - The seal will be released in poor quality.
Having looked at pdf layouts, I found out that tables with colored cells and marked signs are used there. And here only DataGrid comes to a head (very very big such DataGrid).
What I would like to know:
- Is the correct solution to use a datagrid for this purpose? Also a question about performance. And also how to print all this as a vector.
- Maybe there are some components for this purpose?
PS: For the second day I have not found anything more or less good for Google.
UPD3: Thanks @VladD for a tip towards the Canvas. Resolved yet. Made from this example .
Now I do not know how to output blocks asynchronously. The code for calculating blocks itself is not a problem to make asynchronous, but I don’t know further. Hangs UI. I tried different methods that we find on stackoverflow, but without results.
Created a new question, because the problem is different: here .
квадратик.MouseDown += OnКвадратикMouseDown? And to write, put insideTextBlock, this is WPF. - VladD