/// <summary> /// Builds a new instance of DotFileTabItem asynchronously /// </summary> /// <param name="dotFilePath">The path to the dot file that the tab should render</param> /// <returns>The DotFileTabItem instance</returns> public async Task<DotFileTabItem> BuildAsync(string dotFilePath) { var tabItem = new DotFileTabItem(_DotFileImageConverterService, dotFilePath); await tabItem.LoadAsync(); return tabItem; }
/// <summary> /// Event handler used to select the newest tab added to <see cref="ItemSource">ItemSource</see> /// </summary> /// <param name="sender">The object that raised the CollectionChanged event</param> /// <param name="e">The event arguments</param> private void ItemSource_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { SelectedTab = ItemSource.Last(); }