Definition
- Namespace:
- Tizen.System
- Assembly:
- Tizen.System.dll
- API Level:
- 3
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/display
The Display class provides the properties and events to control the display status and brightness.
public class Display : object
- Inheritance
-
Examples
Console.WriteLine("Display current state is: {0}", Tizen.System.Display.State);
Console.WriteLine("Total number of Displays are: {0}", Tizen.System.Display.NumberOfDisplays);
Properties
View Source
Brightness
The brightness value of the display.
Declaration
public int Brightness { get; set; }
Property Value
Examples
Display display = Display.Displays[0];
Console.WriteLine("Display current Brightness is: {0}", display.Brightness);
API Level: 3
View Source
Displays
Gets all the available displays.
The display at the index zero is always assigned to the main display.
Declaration
public static IReadOnlyList<Display> Displays { get; }
Property Value
Type |
Description |
IReadOnlyList<Display> |
|
API Level: 3
View Source
MaxBrightness
The maximum brightness value that can be set for the specific display.
Declaration
public int MaxBrightness { get; }
Property Value
Examples
Display display = Display.Displays[0];
Console.WriteLine("Display MaxBrightness is: {0}", display.MaxBrightness);
API Level: 3
View Source
NumberOfDisplays
The number of available display devices.
Declaration
public static int NumberOfDisplays { get; }
Property Value
API Level: 3
Declaration
public static DisplayState State { get; set; }
Property Value
API Level: 3
Events
View Source
StateChanged
StateChanged is raised when the state of the display is changed.
Declaration
public static event EventHandler<DisplayStateChangedEventArgs> StateChanged
Event Type
Examples
public static async Task DisplayEventHandler()
{
EventHandler<DisplayStateChangedEventArgs> handler = null;
handler = (object sender, DisplayStateChangedEventArgs args) =>
{
Console.WriteLine("Display State is: {0}", args.State);
}
Battery.StateChanged += handler;
await Task.Delay(20000);
}
API Level: 3
Extension Methods