Interaction logic for MainWindow.xaml
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ContentControl
System.Windows.Window
MahApps.Metro.Controls.MetroWindow
MarkdownMonster.MainWindow
public class MainWindow : MetroWindow, IComponentConnector, IStyleConnector
Class Members
Member | Description | |
---|---|---|
Constructor |
||
ButtonShowFavorites |
ButtonShowFavorites Name Field | |
ConsolePanel |
ConsolePanel Name Field | |
DocumentType |
DocumentType Name Field | |
FolderBrowser |
FolderBrowser Name Field | |
ForceClose |
||
LeftSidebarColumn |
LeftSidebarColumn Name Field | |
LeftSidebarSeparatorColumn |
LeftSidebarSeparatorColumn Name Field | |
MainMenu |
MainMenu Name Field | |
MainMenuFile |
MainMenuFile Name Field | |
MainMenuTools |
MainMenuTools Name Field | |
MainMenuView |
MainMenuView Name Field | |
MainWindowEditorColumn |
MainWindowEditorColumn Name Field | |
RightSidebarColumn |
RightSidebarColumn Name Field | |
RightSidebarContainer |
RightSidebarContainer Name Field | |
RightSidebarSeparatorColumn |
RightSidebarSeparatorColumn Name Field | |
SidebarContainer |
SidebarContainer Name Field | |
StatusEncoding |
StatusEncoding Name Field | |
StatusStats |
StatusStats Name Field | |
StatusText |
StatusText Name Field | |
TabControl |
TabControl Name Field | |
TabDocumentOutline |
TabDocumentOutline Name Field | |
TabFolderBrowser |
TabFolderBrowser Name Field | |
WebServer |
Internal instance of a local Web Server that can be used to push commands to Markdown Monster. | |
ActivateTab |
Activates a tab from an active tab instance public Task public Task |
|
AddEditToolbarIcon |
Adds a fontawesome icon to the editor toolbar (or any toolbar you specify explicitly). Specify the FontAwesome Icon image name (FontAwesome.Wpf proper Case Syntax) public void AddEditToolbarIcon(string iconName, string markdownActionCommand, ToolBar toolbar, ICommand command) public void AddEditToolbarIcon(ImageSource icon, string markdownActionCommand, ToolBar toolbar, ICommand command) |
|
AddLeftSidebarPanelTabItem |
Adds a new panel to the sidebar, and adds header text and icon explicitly. This overload provides a simpler way to add icon and header public void AddLeftSidebarPanelTabItem(TabItem tabItem, string tabHeaderText, ImageSource tabHeaderIcon, bool selectItem) |
|
AddRecentFile |
public void AddRecentFile(string file, bool noConfigWrite) |
|
AddRightSidebarPanelTabItem |
Adds a new panel to the right sidebar public void AddRightSidebarPanelTabItem(TabItem tabItem, string tabHeaderText, ImageSource tabHeaderIcon, bool selectItem) |
|
BindTabHeaders |
Binds all Tab Headers public void BindTabHeaders() |
|
Button_Handler |
Generic button handler that handles a number of simple tasks in a single method to minimize class noise. public void Button_Handler(object sender, RoutedEventArgs e) |
|
CloseAllTabs |
public Task |
|
CloseTab |
Closes a tab and ask for confirmation if the tab doc is dirty. public Task public Task |
|
GenerateContextMenuItemsFromOpenTabs |
public List |
|
GetActiveMarkdownEditor |
public MarkdownDocumentEditor GetActiveMarkdownEditor() |
|
GetDragablzItemFromTabItem |
Returns a DragablzItem from a TabItem public DragablzItem GetDragablzItemFromTabItem(TabItem tab) |
|
GetDragablzItems |
Returns a list of DragablzItems public List |
|
GetTabFromFilename |
Retrieves an open tab based on its filename. public TabItem GetTabFromFilename(string filename) |
|
GetTabItemFromDragablz |
Returns a TabItem from a Dragablz (Content - convenience method) public TabItem GetTabItemFromDragablz(DragablzItem dgz) |
|
InitializeComponent |
InitializeComponent public sealed void InitializeComponent() |
|
LoadPreviewBrowser |
Create an instance of the Preview Browser either using the default IE based preview browser, or if an addin has registered a custom preview browser. public void LoadPreviewBrowser() |
|
Navigate |
public void Navigate(string url) |
|
NextTab |
public Task NextTab() |
|
OnAddinsLoaded |
This is called only if addin loading takes very long Potentially fired off public Task OnAddinsLoaded() |
|
OpenBrowserTab |
Opens a preview tab public Task |
|
OpenFavorites |
public void OpenFavorites(bool noActivate) |
|
OpenFile |
High level wrapper around OpenTab() that checks for different file types like images and projects that have non-tab behavior. public Task |
|
OpenSearchPane |
public FileSearchControl OpenSearchPane(bool noActivate) |
|
OpenTab |
Opens a tab by a filename public Task |
|
PreviewMarkdown |
Refreshes the Preview Browser. Although this method is synchronous, the refresh occurs asynchronously using Fire and Forget public void PreviewMarkdown(MarkdownDocumentEditor editor, bool keepScrollPosition, bool showInBrowser, string renderedHtml) |
|
PreviewMarkdownAsync |
Refreshes the preview browser. This method can be awaited to wait for completion or ignore the task result to let it run in the background. public Task PreviewMarkdownAsync(MarkdownDocumentEditor editor, bool keepScrollPosition, string renderedHtml) |
|
PreviousTab |
public Task PreviousTab() |
|
RefreshTabFromFile |
Refreshes an already loaded tab with contents of a new (or the same file) file by just replacing the document's text. public Task public Task |
|
SaveFile |
public Task |
|
SaveSettings |
Save active settings of the UI that are persisted in the configuration public Task SaveSettings() |
|
SetEditorFocus |
Helper method that sets editor focus public void SetEditorFocus() |
|
SetStatusIcon |
Status the statusbar icon on the left bottom to some indicator public void SetStatusIcon(FontAwesomeIcon icon, Color color, bool spin) public void SetStatusIcon() |
|
SetWindowTitle |
Sets the Window Title followed by Markdown Monster (registration status) by default the filename is used and it's updated whenever tabs are changed. public void SetWindowTitle(string title) |
|
ShowFolderBrowser |
Shows or hides the File Browser public void ShowFolderBrowser(bool hide, string folder) |
|
ShowLeftSidebar |
public void ShowLeftSidebar(bool hide) |
|
ShowMessageOverlayAsync |
Helper routine to show a Metro Dialog. Note this dialog popup is fully async! public Task |
|
ShowPreviewBrowser |
Shows or hides the preview browser public void ShowPreviewBrowser(bool hide, bool refresh) |
|
ShowRightSidebar |
public void ShowRightSidebar(bool hide) |
|
ShowStatus |
public void ShowStatus(string message, int milliSeconds, FontAwesomeIcon icon, Color color, bool spin) public void ShowStatus(string message, int milliSeconds, FontAwesomeIcon icon, Color color, bool spin, bool flashIcon) |
|
ShowStatusError |
Displays an error message using common defaults for a timeout milliseconds public void ShowStatusError(string message, int timeout, FontAwesomeIcon icon, Color color) public void ShowStatusError(string message, int timeout, FontAwesomeIcon icon, Color color, bool flashIcon) |
|
ShowStatusProgress |
Displays an Progress message using common defaults including a spinning icon public void ShowStatusProgress(string message, int timeout, FontAwesomeIcon icon, Color color, bool spin) |
|
ShowStatusSuccess |
Shows a success message with a green check icon for the timeout public void ShowStatusSuccess(string message, int timeout, FontAwesomeIcon icon, Color color) public void ShowStatusSuccess(string message, int timeout, FontAwesomeIcon icon, Color color, bool flashIcon) |
|
SyncFolderBrowser |
Syncs the folder browser to the active document public void SyncFolderBrowser() |
|
TabToolTip |
Displays a tool tip on a tab public void TabToolTip(DragablzItem dgz) |
|
UpdateDocumentOutline |
public void UpdateDocumentOutline(int editorLineNumber) |
|
FavoritesTab |
||
Hwnd |
||
KeyBindings |
Keybindings for the window and editor. | |
LintingErrorTab |
||
Model |
||
PipeManager |
||
PreviewBrowser |
Manages the Preview Rendering in a WebBrowser Control | |
PreviewBrowserContainer |
The Preview Browser Container Grid that contains the Web Browser control that handles the Document tied preview. | |
PreviewBrowserWindow |
||
PreviewTab |
The Preview Browser Tab if active that is used for image and URL previews (ie. the Preview without an associated editor) | |
SearchTab |
Requirements
Namespace: MarkdownMonsterAssembly: markdownmonster.exe
© West Wind Technologies, 2016-2024 • Updated: 11/23/21
Comment or report problem with topic