Ejemplo n.º 1
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                OnResetSearchCommand();
                EditingContext = null;

                _deferredExpansionAndCalculateAdorners.Dispose();
                _deferredExpansionAndCalculateAdorners = null;
                _deferredUpdateNextAndPreviousSearchResults.Dispose();
                _deferredUpdateNextAndPreviousSearchResults = null;

                UnhookScrollBarEvents(_vScrollBar);
                _vScrollBar = null;

                if (_frameTreeView != null)
                {
                    _frameTreeView.ContextMenuOpening -= OnContextMenuOpening;
                    _frameTreeView.PreviewMouseDown   -= OnTreeViewPreviewMouseDown;
                    _frameTreeView.PreviewMouseMove   -= OnTreeViewPreviewMouseMove;
                    _frameTreeView.PreviewMouseUp     -= OnTreeViewPreviewMouseUp;
                    _frameTreeView = null;
                }

                if (_frameContent != null)
                {
                    _frameContent.Dispose();
                    _frameContent = null;
                }
            }
        }
Ejemplo n.º 2
0
        public EntityDesignExplorerFrame(EditingContext context)
            : base(context)
        {
            DefineCmd(WorkspaceCommands.Activate, ExecuteActivate, CanExecuteActivate);
            DefineCmd(WorkspaceCommands.PutInRenameMode, ExecutePutInRenameMode, CanExecutePutInRenameMode);
            _putSelectedExplorerItemInRenameModeRequest = new DeferredRequest(PutSelectedItemInRenameMode);
            Loaded += ExplorerFrameLoaded;

#pragma warning disable 0618 // DpiHelper is obsolete, need to move to DpiAwareness (and ImageManifest)
            // set bitmap scaling mode to most appropriate value based on text scaling
            RenderOptions.SetBitmapScalingMode(this, DpiHelper.BitmapScalingMode);
#pragma warning restore 0618
        }
Ejemplo n.º 3
0
        public EntityDesignExplorerFrame(EditingContext context)
            : base(context)
        {
            DefineCmd(WorkspaceCommands.Activate, ExecuteActivate, CanExecuteActivate);
            DefineCmd(WorkspaceCommands.PutInRenameMode, ExecutePutInRenameMode, CanExecutePutInRenameMode);
            _putSelectedExplorerItemInRenameModeRequest = new DeferredRequest(PutSelectedItemInRenameMode);
            Loaded += ExplorerFrameLoaded;

#if VS12ORNEWER
            // set bitmap scaling mode to most appropriate value based on text scaling
            RenderOptions.SetBitmapScalingMode(this, DpiHelper.BitmapScalingMode);
#endif
        }
        public EntityDesignExplorerFrame(EditingContext context)
            : base(context)
        {
            DefineCmd(WorkspaceCommands.Activate, ExecuteActivate, CanExecuteActivate);
            DefineCmd(WorkspaceCommands.PutInRenameMode, ExecutePutInRenameMode, CanExecutePutInRenameMode);
            _putSelectedExplorerItemInRenameModeRequest = new DeferredRequest(PutSelectedItemInRenameMode);
            Loaded += ExplorerFrameLoaded;

#if VS12ORNEWER
    // set bitmap scaling mode to most appropriate value based on text scaling
            RenderOptions.SetBitmapScalingMode(this, DpiHelper.BitmapScalingMode);
#endif
        }
Ejemplo n.º 5
0
        protected ExplorerFrame(EditingContext context)
        {
            EditingContext = context;

            // search text commands
            _searchCommand      = new DelegateCommand(OnSearchCommand);
            _resetSearchCommand = new DelegateCommand(OnResetSearchCommand);

            // navigate search commands
            _selectPreviousSearchResult = new DelegateCommand(OnSelectPreviousSearchResult);
            _selectNextSearchResult     = new DelegateCommand(OnSelectNextSearchResult);

            _deferredExpansionAndCalculateAdorners      = new DeferredRequest(OnExpanded);
            _deferredUpdateNextAndPreviousSearchResults = new DeferredRequest(OnUpdateNextAndPreviousResults);
        }
Ejemplo n.º 6
0
        protected ExplorerFrame(EditingContext context)
        {
            EditingContext = context;

            // search text commands
            _searchCommand = new DelegateCommand(OnSearchCommand);
            _resetSearchCommand = new DelegateCommand(OnResetSearchCommand);

            // navigate search commands
            _selectPreviousSearchResult = new DelegateCommand(OnSelectPreviousSearchResult);
            _selectNextSearchResult = new DelegateCommand(OnSelectNextSearchResult);

            _deferredExpansionAndCalculateAdorners = new DeferredRequest(OnExpanded);
            _deferredUpdateNextAndPreviousSearchResults = new DeferredRequest(OnUpdateNextAndPreviousResults);
        }
Ejemplo n.º 7
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                OnResetSearchCommand();
                EditingContext = null;

                _deferredExpansionAndCalculateAdorners.Dispose();
                _deferredExpansionAndCalculateAdorners = null;
                _deferredUpdateNextAndPreviousSearchResults.Dispose();
                _deferredUpdateNextAndPreviousSearchResults = null;

                UnhookScrollBarEvents(_vScrollBar);
                _vScrollBar = null;

                if (_frameTreeView != null)
                {
                    _frameTreeView.ContextMenuOpening -= OnContextMenuOpening;
                    _frameTreeView.PreviewMouseDown -= OnTreeViewPreviewMouseDown;
                    _frameTreeView.PreviewMouseMove -= OnTreeViewPreviewMouseMove;
                    _frameTreeView.PreviewMouseUp -= OnTreeViewPreviewMouseUp;
                    _frameTreeView = null;
                }

                if (_frameContent != null)
                {
                    _frameContent.Dispose();
                    _frameContent = null;
                }
            }
        }