Skip to content

Commit 5c3a190

Browse files
committed
fix some warnings
'LayoutOptions.FillAndExpand' is obsolete: 'The StackLayout expansion options are deprecated; please use a Grid instead.'
1 parent f592982 commit 5c3a190

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Source/OxyplotMauiSample/Pages/IssueDemos/Pages/AddPlotViews.xaml.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ public void AddButtonClicked(object sender, EventArgs e)
2121
int n = this.layout1.Children.Count + 1;
2222
var pm = new PlotModel { Title = "Plot " + n, Background = backgroundColors[n % backgroundColors.Length] };
2323
pm.Series.Add(new FunctionSeries(x => Math.Sin(n * x), 0, 20, 500, "sin(x)"));
24-
var pv = new PlotView();
25-
pv.Model = pm;
26-
pv.HorizontalOptions = LayoutOptions.FillAndExpand;
27-
pv.HeightRequest = 200;
24+
var pv = new PlotView()
25+
{
26+
Model = pm,
27+
HorizontalOptions = LayoutOptions.Fill,
28+
HeightRequest = 200,
29+
};
2830
this.layout1.Children.Add(pv);
2931
}
3032
public void RemoveButtonClicked(object sender, EventArgs e)

Source/OxyplotMauiSample/Pages/IssueDemos/Pages/TabbedPageWithItemTemplate.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public SubPage()
4343

4444
var plotView = new PlotView
4545
{
46-
HorizontalOptions = LayoutOptions.FillAndExpand,
47-
VerticalOptions = LayoutOptions.FillAndExpand,
46+
HorizontalOptions = LayoutOptions.Fill,
47+
VerticalOptions = LayoutOptions.Fill,
4848
Model = plotModel
4949
};
5050

0 commit comments

Comments
 (0)