Exemplo n.º 1
0
        void UpdateCurrentItem(ShellContent content)
        {
            if (_currentContent != null)
            {
                _currentContent.Hide();
                _contentArea.UnPack(_currentContent);
                _currentContent = null;
            }

            if (content == null)
            {
                return;
            }

            if (!_contentCache.ContainsKey(content))
            {
                var native = CreateShellContent(content);
                native.SetAlignment(-1, -1);
                native.SetWeight(1, 1);
                _contentCache[content] = native;
            }
            _currentContent = _contentCache[content];
            _currentContent.Show();
            _contentArea.PackEnd(_currentContent);
        }