.Net中是否有针对CSS媒体类型的系统枚举?

时间:2023-01-26 13:14:53

I was wondering if there is an enum inside .NET that contains all the different media types that you can use in css?

我想知道.NET中是否包含一个enum,其中包含可以在css中使用的所有不同媒体类型?

Something like:

/// <summary>
/// List of available media types for css (comments from http://www.w3schools.com/css/css_mediatypes.asp)
/// </summary>
public enum CssMediaType
{
    /// <summary>
    /// Used for all media type devices
    /// </summary>
    all,
    /// <summary>
    /// Used for speech and sound synthesizers
    /// </summary>
    aural,
    /// <summary>
    /// Used for braille tactile feedback devices
    /// </summary>
    braille,
    /// <summary>
    /// Used for paged braille printers
    /// </summary>
    embossed,
    /// <summary>
    /// Used for small or handheld devices
    /// </summary>
    handheld,
    /// <summary>
    /// Used for printers
    /// </summary>
    print,
    /// <summary>
    /// Used for projected presentations, like slides
    /// </summary>
    projection,
    /// <summary>
    /// Used for computer screens
    /// </summary>
    screen,
    /// <summary>
    /// Used for media using a fixed-pitch character grid, like teletypes and terminals
    /// </summary>
    tty,
    /// <summary>
    /// Used for television-type devices
    /// </summary>
    tv
}

1 个解决方案

#1


1  

I've never come across one ... but it looks like you've given it a heck of a go already :-)

我从来没有碰到过一个......但是看起来你已经把它弄得一团糟了:-)

#1


1  

I've never come across one ... but it looks like you've given it a heck of a go already :-)

我从来没有碰到过一个......但是看起来你已经把它弄得一团糟了:-)