Beispiel #1
0
 private void SendMessage_Click(object sender, EventArgs e)
 {
     messages.Add(new Message {
         Content = ComposeMessage.Text
     });
     ComposeMessage.Text = String.Empty;
     MainScroller.UpdateLayout();
     MainScroller.ScrollToVerticalOffset(MainScroller.ScrollableHeight);
 }
Beispiel #2
0
 private void ComposeMessage_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         messages.Add(new Message {
             Content = ComposeMessage.Text
         });
         ComposeMessage.Text = String.Empty;
         MainScroller.UpdateLayout();
         MainScroller.ScrollToVerticalOffset(MainScroller.ScrollableHeight);
     }
 }
Beispiel #3
0
 private void OnVerticalOffsetChanged(DependencyPropertyChangedEventArgs e)
 {
     MainScroller.ScrollToVerticalOffset((double)e.NewValue);
 }