예제 #1
0
        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);
        }
예제 #2
0
        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);
        }