-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMainPage.xaml
50 lines (41 loc) · 1.78 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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"
xmlns:local="clr-namespace:BiArcTutorial"
x:Class="BiArcTutorial.MainPage">
<ContentPage.BindingContext>
<local:ViewModel x:Name="pageContext"/>
</ContentPage.BindingContext>
<ContentPage.Resources>
<local:Visualizer x:Key="drawable"
Bezier="{Binding SelectedCurve}"
Approx="{Binding Approx}"
SelectedArcIndex="{Binding SelectedArcIndex}"
BindingContext="{Reference pageContext}"/>
</ContentPage.Resources>
<HorizontalStackLayout>
<VerticalStackLayout Margin="10,50,100,0">
<Label Text="Bezier" />
<Picker x:Name="picker"
Title="Select a bezier"
ItemsSource="{Binding LabeledCurves}"
SelectedIndex="{Binding SelectedCurveIndex}"/>
<Label Text="Nr. arcs:" />
<Label Text="{Binding NrArcs}" />
<Label Text="Highlighted arc" />
<Slider Value="{Binding SelectedArcIndex}"
Minimum="1"
Maximum="{Binding NumberOfArcs}"/>
<Label Text="Maximum error" />
<Slider Value="{Binding MaxError}"
Minimum="1"
Maximum="100"/>
</VerticalStackLayout>
<Border>
<GraphicsView x:Name= "graphicsView"
Drawable="{x:StaticResource drawable}"
HeightRequest="800"
WidthRequest="800"/>
</Border>
</HorizontalStackLayout>
</ContentPage>