Clarify ICanvas and GraphicsView
- Dominant language
- No language data
- Stars
- 282
- Forks
- 265
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
This documentation is terrible! Following it only leads to confusion, dead-ends, and frustration.
Stop abusing your readers by sending them into page linking hell! Discuss the ICanvas in the context of GraphicsView and vice-versa on the same page instead of cross-linking back and forth. They are related and inseparable, so why separate them when discussing them?
Your examples are utterly useless. We know how to draw, but we want to know where to draw. There's not a single complete example on the page! Just snippets of drawing code without context! Do you expect your reader to reconstruct the samples? Where do they go? Fortunately, some of us have prior experience with graphics libraries.
```
public class MyGraphics : IDrawable
{
// Put your drawing code in here!
public void Draw(ICanvas canvas, RectF dirtyRect)
{
canvas.StrokeColor = Colors.GreenYellow;
canvas.StrokeSize = 6;
canvas.DrawLine(10, 10, 90, 100);
}
}
```
Finally, why are you telling us to **Invalidate()** the canvas when it's not necessary?:
> "GraphicsView has an Invalidate method that informs the canvas that it needs to redraw itself. This method must be invoked on a GraphicsView instance:"
`graphicsView.Invalidate();`
Assume for it is necessary, where do we obtain a reference to graphics view and, once again, where do we perform the **Invalidate()**?
There's simply no excuse for such a poor documentation.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 2deb823c-ccc8-fdef-6cf8-bb70a2c21939
* Version Independent ID: 2deb823c-ccc8-fdef-6cf8-bb70a2c21939
* Content: [.NET MAUI GraphicsView - .NET MAUI](https://docs.microsoft.com/en-us/dotnet/maui/user-interface/controls/graphicsview)
* Content Source: [docs/user-interface/controls/graphicsview.md](https://github.com/dotnet/docs-maui/blob/main/docs/user-interface/controls/graphicsview.md)
* Product: **dotnet-mobile**
* Technology: **dotnet-maui**
* GitHub Login: @davidbritch
* Microsoft Alias: **dabritch**
Contributor guide
Assessment
This issue has not been assessed yet.