/// <summary> /// 注册通知 /// </summary> private void RegisterMessenger() { Messenger.Default.Register <bool>(this, ScrollChatBubbleMessageToBottom, value => { if (value) { SVChatBubbleList.ScrollToBottom(); } }); Messenger.Default.Register <double>(this, ScrollChatMessageListVerticalOffset, offset => { SVChatBubbleList.ScrollToVerticalOffset(offset); }); Messenger.Default.Register <bool>(this, FloatingActionButtonShowUp, value => { if (value) { this.Dispatcher.BeginInvoke((Action) delegate() { ShowStory.Begin(); }); } }); Messenger.Default.Register <bool>(this, FloatingActionButtonHideOff, value => { if (value) { this.Dispatcher.BeginInvoke((Action) delegate() { HideStory.Begin(); }); } }); }
/// <summary> /// 滚动到底部 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnScrollDownClick(object sender, System.Windows.RoutedEventArgs e) { SVChatBubbleList.ScrollToBottom(); var temp = FindResource("OnScrollChangedDown") as Storyboard; temp.Begin(); }