MediaList Class
https://drafts.csswg.org/cssom/#the-medialist-interface
public sealed class MediaList : IEnumerable<string>, IReadOnlyCollection<string>, IReadOnlyList<string>, IEnumerableProperties
| Name | Description |
|---|---|
| Count | Gets the number of media queries in the list. |
| Length | Gets the number of media queries in the list. |
| MediaText | https://drafts.csswg.org/cssom/#dom-medialist-mediatext |
Count
MediaList.csLength
MediaList.csGets the number of media queries in the list.
public uint Length { get; }MediaText
MediaList.cshttps://drafts.csswg.org/cssom/#dom-medialist-mediatext
public string MediaText { get; set; }Indexers
| Name | Description |
|---|---|
| this[int] | Gets the media query at the given index. |
| this[uint] | Gets the media query at the given index, or null when the index is out of range. |
ItemAt overloads
this[int]
MediaList.csthis[uint]
MediaList.csGets the media query at the given index, or null when the index is out of range.
Methods
| Name | Description |
|---|---|
| AppendMedium(string) | https://drafts.csswg.org/cssom/#dom-medialist-appendmedium |
| DeleteMedium(string) | https://drafts.csswg.org/cssom/#dom-medialist-deletemedium |
| GetEnumerator() | Returns an enumerator that iterates through the media queries of the list. |
| Item(uint) | Returns the media query at the given index, or null when the index is out of range. |
| System.Collections.Generic.IReadOnlyList<System.String>.get_Item(int) | |
| System.Collections.IEnumerable.GetEnumerator() | |
| ToString() | Returns the serialized media query list. |
AppendMedium(string)
MediaList.cshttps://drafts.csswg.org/cssom/#dom-medialist-appendmedium
DeleteMedium(string)
MediaList.cshttps://drafts.csswg.org/cssom/#dom-medialist-deletemedium
GetEnumerator()
MediaList.csReturns an enumerator that iterates through the media queries of the list.
public IEnumerator<string> GetEnumerator()Returns
Item(uint)
MediaList.csReturns the media query at the given index, or null when the index is out of range.
System.Collections.Generic.IReadOnlyList<System.String>.get_Item(int)
System.Collections.IEnumerable.GetEnumerator()
MediaList.csToString()
MediaList.csReturns the serialized media query list.
public override string ToString()