Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
'LayoutOptions.FillAndExpand' is obsolete: 'The StackLayout expansion options are deprecated; please use a Grid instead.'
  • Loading branch information
janusw committed Nov 28, 2023
1 parent f592982 commit 5c3a190
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ public void AddButtonClicked(object sender, EventArgs e)
int n = this.layout1.Children.Count + 1;
var pm = new PlotModel { Title = "Plot " + n, Background = backgroundColors[n % backgroundColors.Length] };
pm.Series.Add(new FunctionSeries(x => Math.Sin(n * x), 0, 20, 500, "sin(x)"));
var pv = new PlotView();
pv.Model = pm;
pv.HorizontalOptions = LayoutOptions.FillAndExpand;
pv.HeightRequest = 200;
var pv = new PlotView()
{
Model = pm,
HorizontalOptions = LayoutOptions.Fill,
HeightRequest = 200,
};
this.layout1.Children.Add(pv);
}
public void RemoveButtonClicked(object sender, EventArgs e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public SubPage()

var plotView = new PlotView
{
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.Fill,
VerticalOptions = LayoutOptions.Fill,
Model = plotModel
};

Expand Down

0 comments on commit 5c3a190

Please sign in to comment.