This commit is contained in:
Javier Suárez Ruiz 2021-10-14 17:03:44 +02:00
Родитель 3fdbde850e
Коммит 236a04c89e
5 изменённых файлов: 22 добавлений и 5 удалений

Просмотреть файл

@ -30,6 +30,24 @@ If you want to try it out, add the nightly feed to your [NuGet sources](https://
</configuration>
```
After adding the Microsoft.Maui.Graphics.Controls package, modify the MauiProgram class to register the drawn control handlers:
```csharp
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var appBuilder = MauiApp.CreateBuilder();
appBuilder
.UseMauiApp<App>()
.ConfigureGraphicsControls());
return appBuilder.Build();
}
}
```
## What controls are available?
Currently, the following controls are available:

Просмотреть файл

@ -31,8 +31,7 @@ namespace GraphicsControls.Sample.Controls
string valueString = VirtualView.Value.ToString("####0.00");
const float margin = 12.0f;
canvas.DrawString(valueString, x, y, width - margin, height, HorizontalAlignment.Right, VerticalAlignment.Top);
canvas.DrawString(valueString, x, y, width, height, HorizontalAlignment.Right, VerticalAlignment.Top);
canvas.RestoreState();

Просмотреть файл

@ -15,7 +15,7 @@ namespace GraphicsControls.Sample
var scrollView = new ScrollView();
var verticalStack = new StackLayout() { Margin = 12 };
var verticalStack = new StackLayout() { Margin = 2 };
verticalStack.Add(CreateDrawCustomSlider());
//verticalStack.Add(CreateCustomSliderMapper());

Просмотреть файл

@ -16,7 +16,7 @@ namespace GraphicsControls.Sample
var scrollView = new ScrollView();
var verticalStack = new StackLayout() { Margin = 12 };
var verticalStack = new StackLayout() { Margin = 2 };
verticalStack.Add(CreateButton());
verticalStack.Add(CreateCheckBox());

Просмотреть файл

@ -30,7 +30,7 @@
<ContentPage.Content>
<ScrollView>
<StackLayout
Margin="12">
Margin="2">
<!-- BUTTON -->
<StackLayout
BackgroundColor="{AppThemeBinding Dark={StaticResource DarkSectionBackgroundColor}, Light={StaticResource LightSectionBackgroundColor}}">