Maui.Net Graphics

Yusuf 791 Reputation points
2022-06-02T09:01:30.747+00:00

Hi
I want to move from Xamarin and Skai Sharp to Maui.Net.
How to start with graphics in Maui.Net

I tried to create simple graphics app but I dont know how to start.
This is XAML code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="PatternApp.MainPage">

    <StackLayout>
        <GraphicsView x:Name="graphicsview" WidthRequest="300" HeightRequest="300" />
     </StackLayout> 
</ContentPage>

What should I write in the cs file to draw a blue box ?

canvas.FillRectangle(50, 50, 200, 200);

Thanks in advance

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,592 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 85,806 Reputation points
    2022-06-02T09:10:30.337+00:00

    You can see : Draw graphical objects


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.