MainWindow.RefreshTabFromFile

Refreshes an already loaded tab with contents of a new (or the same file) file by just replacing the document's text.

If the tab is not found a new tab is opened.

Note: File must already be open for this to work

public Task<TabItem> RefreshTabFromFile(string editorFile,
	bool maintainScrollPosition,
	bool noPreview,
	bool noSelectTab,
	bool noFocus,
	bool readOnly,
	bool isPreview,
	TabItem existingTab)

Return Value

selected tab item or null

Parameters

editorFile
File name to display int the tab

maintainScrollPosition
If possible preserve scroll position if refreshing

noPreview
If true don't refresh the preview after updating the file

noSelectTab

noFocus
if true don't focus the editor

readOnly
if true document can't be edited

isPreview
Determines whether this tab is treated like a preview tab

existingTab
Allows passing in an existing tab to reload a new file into.

Overloads:


See also:

Class MainWindow

© West Wind Technologies, 2016-2023 • Updated: 05/18/22
Comment or report problem with topic