Ejemplo n.º 1
0
        public MessageHistoryPage()
        {
            Title = "History";

            _client = new OMGITServiceClient(binding, EndPoint);
            _client.GetRecentMessagesAsync();
            _client.GetRecentMessagesCompleted += ClientOnGetMessagesCompleted;

            while (msgs[0] == null)
            {
                continue;
            }

            foreach (string m in msgs)
            {
                historyLayout.Children.Add(new Frame {
                    Padding = 3, Content = new Label {
                        Text = m, FontSize = 20, TextColor = Color.White
                    }, BackgroundColor = Color.FromHex("1a1a1a"), OutlineColor = Color.FromHex("14986D")
                });
            }

            ScrollView historyView = new ScrollView {
                Content = historyLayout
            };

            Content = historyView;
            Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0);
        }