11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <ContentPage x : Class =" OxyplotMauiSample.CustomTrackerPage" xmlns =" http://schemas.microsoft.com/dotnet/2021/maui" xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml" xmlns : oxy =" clr-namespace:OxyPlot.Maui.Skia;assembly=OxyPlot.Maui.Skia" >
3- <oxy : PlotView x : Name =" PlotView" >
4- <oxy : PlotView .DefaultTrackerTemplate>
5- <ControlTemplate >
6- <oxy : TrackerControl
7- Background =" #DC393838"
8- BorderBrush =" Lime"
9- BorderThickness =" 1"
10- CornerRadius =" 4"
11- LineDashArray =" 1,1"
12- LineExtents =" {Binding PlotModel.PlotArea}"
13- LineStroke =" Gold"
14- Position =" {Binding Position}"
15- ShowPointer =" False" >
16- <Grid HorizontalOptions =" Center" VerticalOptions =" Center" >
17- <VerticalStackLayout >
18- <VisualElement .Resources>
19- <Style TargetType =" Label" >
20- <Setter Property =" TextColor" Value =" White" />
21- </Style >
22- </VisualElement .Resources>
23- <Label HorizontalOptions =" Center" Text =" {Binding Series.Title}" />
24- <BoxView Margin =" 4,0" HeightRequest =" 1" Color =" WhiteSmoke" />
25- <Grid Margin =" 5" ColumnDefinitions =" Auto,Auto" RowDefinitions =" Auto,Auto,Auto,Auto" >
26- <Label Grid.Row=" 0" Grid.Column=" 0" Text =" DataPoint.X:" />
27- <Label Grid.Row=" 0" Grid.Column=" 1" Text =" {Binding DataPoint.X, StringFormat='{0:F3}'}" />
2+ <ContentPage x : Class =" OxyplotMauiSample.CustomTrackerPage"
3+ xmlns =" http://schemas.microsoft.com/dotnet/2021/maui"
4+ xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
5+ xmlns : ox =" clr-namespace:OxyPlot;assembly=OxyPlot"
6+ xmlns : oxy =" clr-namespace:OxyPlot.Maui.Skia;assembly=OxyPlot.Maui.Skia" >
7+ <oxy : PlotView x : Name =" PlotView" >
8+ <oxy : PlotView .DefaultTrackerTemplate>
9+ <ControlTemplate >
10+ <oxy : TrackerControl
11+ x : DataType =" ox:TrackerHitResult"
12+ Background =" #DC393838"
13+ BorderBrush =" Lime"
14+ BorderThickness =" 1"
15+ CornerRadius =" 4"
16+ LineDashArray =" 1,1"
17+ LineExtents =" {Binding PlotModel.PlotArea}"
18+ LineStroke =" Gold"
19+ Position =" {Binding Position}"
20+ ShowPointer =" False" >
21+ <Grid HorizontalOptions =" Center"
22+ VerticalOptions =" Center" >
23+ <VerticalStackLayout >
24+ <VisualElement .Resources>
25+ <Style TargetType =" Label" >
26+ <Setter Property =" TextColor"
27+ Value =" White" />
28+ </Style >
29+ </VisualElement .Resources>
30+ <Label HorizontalOptions =" Center"
31+ Text =" {Binding Series.Title}" />
32+ <BoxView Margin =" 4,0"
33+ HeightRequest =" 1"
34+ Color =" WhiteSmoke" />
35+ <Grid Margin =" 5"
36+ ColumnDefinitions =" Auto,Auto"
37+ RowDefinitions =" Auto,Auto,Auto,Auto" >
38+ <Label Grid.Row=" 0"
39+ Grid.Column=" 0"
40+ Text =" DataPoint.X:" />
41+ <Label Grid.Row=" 0"
42+ Grid.Column=" 1"
43+ Text =" {Binding DataPoint.X, StringFormat='{0:F3}'}" />
2844
29- <Label Grid.Row=" 1" Grid.Column=" 0" Text =" DataPoint.Y:" />
30- <Label Grid.Row=" 1" Grid.Column=" 1" Text =" {Binding DataPoint.Y, StringFormat='{0:F3}'}" />
45+ <Label Grid.Row=" 1"
46+ Grid.Column=" 0"
47+ Text =" DataPoint.Y:" />
48+ <Label Grid.Row=" 1"
49+ Grid.Column=" 1"
50+ Text =" {Binding DataPoint.Y, StringFormat='{0:F3}'}" />
3151
32- <Label Grid.Row=" 2" Grid.Column=" 0" Text =" Position.X:" />
33- <Label Grid.Row=" 2" Grid.Column=" 1" Text =" {Binding Position.X, StringFormat='{0:F1}'}" />
52+ <Label Grid.Row=" 2"
53+ Grid.Column=" 0"
54+ Text =" Position.X:" />
55+ <Label Grid.Row=" 2"
56+ Grid.Column=" 1"
57+ Text =" {Binding Position.X, StringFormat='{0:F1}'}" />
3458
35- <Label Grid.Row=" 3" Grid.Column=" 0" Text =" Position.Y:" />
36- <Label Grid.Row=" 3" Grid.Column=" 1" Text =" {Binding Position.Y, StringFormat='{0:F1}'}" />
37- </Grid >
38- </VerticalStackLayout >
39- </Grid >
40- </oxy : TrackerControl >
41- </ControlTemplate >
42- </oxy : PlotView .DefaultTrackerTemplate>
43- </oxy : PlotView >
59+ <Label Grid.Row=" 3"
60+ Grid.Column=" 0"
61+ Text =" Position.Y:" />
62+ <Label Grid.Row=" 3"
63+ Grid.Column=" 1"
64+ Text =" {Binding Position.Y, StringFormat='{0:F1}'}" />
65+ </Grid >
66+ </VerticalStackLayout >
67+ </Grid >
68+ </oxy : TrackerControl >
69+ </ControlTemplate >
70+ </oxy : PlotView .DefaultTrackerTemplate>
71+ </oxy : PlotView >
4472</ContentPage >
0 commit comments