public MessagesPage(object source) { var root = new RelativeLayout() { }; Content = root; RootDialog = source as Dialog; root.Children.AddAsRelative(messagesList = new ListView { ItemTemplate = new DataTemplate(this.CellInitialize), HasUnevenRows = true, Margin = new Thickness(0, 0, 0, bottomHeight), SeparatorVisibility = SeparatorVisibility.None, VerticalOptions = LayoutOptions.FillAndExpand // BackgroundColor = Color.LightSkyBlue }, 0, 0, p => p.Width, p => p.Height); root.Children.AddAsRelative(BottomCreation(), p => 0, p => p.Height - bottomHeight, p => p.Width, p => bottomHeight); SourceInit(source); MsgSearchPanel.Initialize(this); }
public static MessagesPage Create(object source) { if (instance == null) { instance = new MessagesPage(source); } else { instance.RootDialog = source as Dialog; instance.SourceInit(source); MsgSearchPanel.Initialize(instance); } return(instance); }