This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fce8325
commit 85b1f6b
Showing
7 changed files
with
66 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
using System; | ||
// <copyright file="DrasticTrayMenuItem.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace DrasticMaui | ||
{ | ||
/// <summary> | ||
/// Drastic Tray Menu Item. | ||
/// </summary> | ||
public class DrasticTrayMenuItem | ||
{ | ||
public DrasticTrayMenuItem (string text, Stream? icon = null) | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="DrasticTrayMenuItem"/> class. | ||
/// </summary> | ||
/// <param name="text">Menu Text.</param> | ||
/// <param name="icon">Icon.</param> | ||
/// <param name="action">Action to perform when clicked.</param> | ||
public DrasticTrayMenuItem (string text, Stream? icon = null, Task<Action>? action = null) | ||
{ | ||
this.Text = text; | ||
this.Icon = icon; | ||
this.Action = action; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the text for the menu item. | ||
/// </summary> | ||
public string Text { get; } | ||
|
||
/// <summary> | ||
/// Gets the icon for the menu item. | ||
/// Optional. | ||
/// </summary> | ||
public Stream? Icon { get; } | ||
|
||
/// <summary> | ||
/// Gets the action to be performed when the item is clicked. | ||
/// Optional. | ||
/// </summary> | ||
public Task<Action>? Action { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters