예제 #1
0
        public void Append(SignalMessageContainer sm)
        {
            var  sourcePanel = (ItemsStackPanel)ConversationItemsControl.ItemsPanelRoot;
            bool bottom      = sourcePanel.LastVisibleIndex == Collection.Count - 2; // -2 because we already incremented Count

            Collection.Add(sm, sm.Message.Author == null);
            if (bottom)
            {
                UpdateLayout();
                ScrollToBottom();
            }
        }
예제 #2
0
        public void Append(SignalMessageContainer sm, bool forceScroll)
        {
            var  sourcePanel = (ItemsStackPanel)ConversationItemsControl.ItemsPanelRoot;
            bool bottom      = sourcePanel.LastVisibleIndex == Collection.Count - 2; /* -2 because we already incremented Count */

            Collection.Add(sm, true);
            if (forceScroll || bottom)
            {
                UpdateLayout();
                ScrollToBottom();
            }
        }
예제 #3
0
        public AppendResult Append(IMessageView sm)
        {
            AppendResult result = new AppendResult(false);
            bool         bottom = GetBottommostIndex() == Collection.Count - 2; // -2 because we already incremented Count

            Collection.Add(sm, sm.Model.Author == null);
            if (bottom)
            {
                UpdateLayout();
                ScrollToBottom();
                if (ActivationState != CoreWindowActivationState.Deactivated)
                {
                    result = new AppendResult(true);
                }
            }
            return(result);
        }
        public AppendResult Append(SignalMessageContainer sm)
        {
            AppendResult result = null;
            bool         bottom = GetBottommostIndex() == Collection.Count - 2; // -2 because we already incremented Count

            Collection.Add(sm, sm.Message.Author == null);
            if (bottom)
            {
                UpdateLayout();
                ScrollToBottom();
                if (ActivationState != CoreWindowActivationState.Deactivated)
                {
                    result = new AppendResult(sm.Index);
                }
            }
            return(result);
        }