Hi, how can change the background of the popup if this is generated runtime with a grid structure?
With Android the background is correct, with iOS the background is transparent, if I set the white color of the grid I still have a step under header
Thanks in advance.
popup = new SfPopupLayout();
popup.PopupView.HeaderTitle = "Axys";
popup.PopupView.AcceptButtonText = Resource.Ok;
var grid = new Grid();
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) });
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) });
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Auto) });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) } );
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
Switch switcherX = new Switch
{
HorizontalOptions = LayoutOptions.EndAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
IsToggled = XSeries.IsVisible
};
switcherX.Toggled += switcherX_Toggled;
Label labelX = new Label
{
TextColor = Color.Red,
Text = Resource.LogVibsAxisX,
HorizontalOptions = LayoutOptions.StartAndExpand,
Margin = new Thickness(5, 0, 0, 0)
};
Switch switcherY = new Switch
{
HorizontalOptions = LayoutOptions.EndAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
IsToggled = YSeries.IsVisible
};
switcherY.Toggled += switcherY_Toggled;
Label labelY = new Label
{
TextColor = Color.Blue,
Text = Resource.LogVibsAxisY,
HorizontalOptions = LayoutOptions.StartAndExpand,
Margin = new Thickness(5, 0, 0, 0)
};
Switch switcherZ = new Switch
{
HorizontalOptions = LayoutOptions.EndAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
IsToggled = ZSeries.IsVisible,
};
switcherZ.Toggled += switcherZ_Toggled;
Label labelZ = new Label
{
TextColor = Color.Green,
Text = Resource.LogVibsAxisZ,
HorizontalOptions = LayoutOptions.StartAndExpand,
Margin = new Thickness(5, 0, 0, 0)
};
grid.Children.Add(labelX, 0, 0);
grid.Children.Add(switcherX, 1, 0);
grid.Children.Add(labelY, 0, 1);
grid.Children.Add(switcherY, 1, 1);
grid.Children.Add(labelZ, 0, 2);
grid.Children.Add(switcherZ, 1, 2);
grid.BackgroundColor = Color.White;
popup.PopupView.ContentTemplate = new DataTemplate(() => { return grid; });
popup.Show();
Attachment:
UNADJUSTEDNONRAW_thumb_27_b9fa9e5b.zip