public HexDataContext(Stream stream) { _vm.Stream = stream; StackGrid.AddChild( UIObjectProviderFactory.CreateNew(ViewProvider.CreateView(Contracts.Hex.Constants.HexView, _vm)), GridChildLength.Auto ); _vm.FocusPositionChanged += delegate { FocusPositionChanged?.Invoke(this, EventArgs.Empty); }; _vm.SelectionStateChanged += delegate { SelectionStateChanged?.Invoke(this, EventArgs.Empty); }; _vm.FocusPositionChanged += delegate { //LostFocus?.Invoke(this, EventArgs.Empty); }; _vm.SelectedToolTipItemModelChanged += delegate { SelectedToolTipItemChanged?.Invoke(this, EventArgs.Empty); }; _customBackgroundBlocksWrapper = new CollectionWrapper < IBrushBlock, WpfHexaEditor.Core.Interfaces.IBrushBlock >(p => new BrushBlockWrapper(p), _vm.CustomBackgroundBlocks); }
public EnumerableDocument() { _vm = new EnumerableTabViewModel(); _vm.SelectedDocumentChanged += OnSelectedTabChanged; UIObject = ViewProvider.CreateView(Constants.EnumerableTabView, _vm); }
public PropertyListDataContext() { _vm = new PropertyListViewViewModel(); UIObject = ViewProvider.CreateView(Contracts.TreeView.Constants.PorpertyListView, _vm); _vm.SelectedPropertyChanged += delegate { SelectedMemberInfoChanged?.Invoke(this, EventArgs.Empty); }; }
public FolderBrowserDataContext(IHaveFileCollection haveFileCollection) { FolderBrowserViewModel = new FolderBrowserViewModel(haveFileCollection); //var vm = FileExplorerDataContextFactory.CreateFolderBrowserDataContext(haveFileCollection); var folderBrowser = ViewProvider.CreateView(Constants.FolderBrowserView, FolderBrowserViewModel); var folderBrowserUIObject = UIObjectProviderFactory.CreateNew(folderBrowser); StackGrid.AddChild(folderBrowserUIObject, new GridChildLength(new System.Windows.GridLength(1, System.Windows.GridUnitType.Star))); }
public UsnJrnlPreviewer(Stream stream) { this._stream = stream ?? throw new ArgumentNullException(nameof(stream)); _vm = new UsnJrnlPreviewerViewModel(stream); UIObject = ViewProvider.CreateView(Constants.UsnJrnlPreviewerView, _vm); }
public NavMenuDataContext() { UIObject = ViewProvider.CreateView(Constants.NavMenuView, NavMenuViewModel); }