private void UpdateCaptionText(int activeTabIndex) { string newCaptionText; // Don't support non-MdiTabPages here. if (activeTabIndex < 0 || !(TabPages[activeTabIndex] is MdiTabPage mdiTabPage)) { newCaptionText = ApplicationTitle; } else if (mdiTabPage.DockedControl.DockProperties.IsModified) { newCaptionText = $"{ModifiedMarkerCharacter} {mdiTabPage.Text} - {ApplicationTitle}"; } else { newCaptionText = $"{mdiTabPage.Text} - {ApplicationTitle}"; } if (DockProperties.CaptionText != newCaptionText) { DockProperties.CaptionText = newCaptionText; DockPropertiesChanged?.Invoke(); } }
public void UpdateText() { DockProperties.CaptionText = StringUtilities.ConditionalFormat(titleString.DisplayText.Value, new[] { OwnerEditor.CodeFilePathDisplayString }); DockPropertiesChanged?.Invoke(); }