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 TabItem RefreshTabFromFile(string editorFile,
	bool maintainScrollPosition,
	bool noPreview,
	bool noSelectTab,
	bool noFocus,
	bool readOnly,
	bool isPreview)

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


See also:

Class MainWindow

© West Wind Technologies, 2019 • Updated: 01/06/19
Comment or report problem with topic