Update README
This commit is contained in:
Родитель
3fdbde850e
Коммит
236a04c89e
18
README.md
18
README.md
|
@ -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}}">
|
||||
|
|
Загрузка…
Ссылка в новой задаче