Interaction logic for EngagementWindow.xaml
Inheritance: System.Windows.Controls.UserControl, IDashboardContentControl
        public ChatWindow(GwupeClientAppContext appContext, EngagementWindow engagementWindow)
        {
            this.InitializeComponent();
            _appContext       = appContext;
            _engagementWindow = engagementWindow;
            Chat              = _engagementWindow.Engagement.Functions["Chat"] as Function;
            Chat.NewActivity += ChatOnNewMessage;
            ChatPanelViewer.ScrollToBottom();
            DataContext = new ChatWindowDataContext(_appContext, this);

            // need to do this here, because we get weird errors if its part of the data context.
            ChatPanel.ItemsSource = new DispatchingCollection <ObservableCollection <IChatMessage>, IChatMessage>(Chat.Conversation.Exchange, Dispatcher);
        }
Beispiel #2
0
        public ChatWindow(GwupeClientAppContext appContext, EngagementWindow engagementWindow)
        {
            this.InitializeComponent();
            _appContext = appContext;
            _engagementWindow = engagementWindow;
            Chat = _engagementWindow.Engagement.Functions["Chat"] as Function;
            Chat.NewActivity += ChatOnNewMessage;
            ChatPanelViewer.ScrollToBottom();
            DataContext = new ChatWindowDataContext(_appContext, this);

            // need to do this here, because we get weird errors if its part of the data context.
            ChatPanel.ItemsSource = new DispatchingCollection<ObservableCollection<IChatMessage>, IChatMessage>(Chat.Conversation.Exchange, Dispatcher);
        }