Пример #1
0
        private void SelectItem(ThumbnailItem newChild)
        {
            if (_lastSelectedChild != null)
            {
                _lastSelectedChild.ClearValue(BackgroundProperty);
            }

            if (newChild != null)
            {
                newChild.SetBinding(BackgroundProperty, new Binding("SelectedBrush")
                {
                    Source = this
                });
            }
            _lastSelectedChild = newChild;
        }
Пример #2
0
        private void SelectItem(ThumbnailItem newChild)
        {
            if (_lastSelectedChild != null)
            {
                _lastSelectedChild.ClearValue(BackgroundProperty);
            }

            if (newChild != null)
            {
                newChild.SetBinding(BackgroundProperty, new Binding("SelectedBrush") { Source = this });
            }
            _lastSelectedChild = newChild;
        }