Beispiel #1
0
        private void UpdateUnreadMessageCount()
        {
            int hasNotBeenSeenCount = _messages.OfType <IHasBeenSeen>().Count(x => !x.HasBeenSeen);

            UnreadMessageCount = _messages.OfType <ICanHaveUnreadMessages>().Sum(x => x.UnreadMessageCount) +
                                 hasNotBeenSeenCount;
        }
        private void Initialize()
        {
            if (_projectPropertyNames == null)
            {
                return;
            }

            var dataGrid = AssociatedObject;

            if (dataGrid == null)
            {
                return;
            }

            dataGrid.Columns.AddRange(_projectPropertyNames.OfType <ProjectPropertyName>().Select(CreateColumn));
            dataGrid.ColumnDisplayIndexChanged += (_, __) => _displayIndexChangedThrottle.Tick();
        }