/// <inheritdoc/> protected override Style SelectStyleCore(object item, DependencyObject container) { return(item switch { CodeLibraryEntry _ => DefaultContainerStyle, CodeLibrarySection _ => PlaceholderContainerStyle, _ => ThrowHelper.ThrowArgumentNullException <Style>(nameof(item), "The input item can't be null") });
public static string ConvertSectionName(CodeLibrarySection section) { return(section switch { CodeLibrarySection.Favorites => "Favorites", CodeLibrarySection.Recent => "Recent", CodeLibrarySection.Samples => "Samples", _ => ThrowHelper.ThrowArgumentException <string>(nameof(section), "Invalid target section") });