Skip to content

Commit 0cede61

Browse files
Fixed bug #257 - Menu Item visibility
1 parent ce52988 commit 0cede61

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ElectronNET.API/Entities/MenuItem.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Newtonsoft.Json;
22
using Newtonsoft.Json.Converters;
33
using System;
4+
using System.ComponentModel;
45

56
namespace ElectronNET.API.Entities
67
{
@@ -68,12 +69,14 @@ public class MenuItem
6869
/// <summary>
6970
/// If false, the menu item will be greyed out and unclickable.
7071
/// </summary>
71-
public bool Enabled { get; set; }
72+
[DefaultValue(true)]
73+
public bool Enabled { get; set; } = true;
7274

7375
/// <summary>
7476
/// If false, the menu item will be entirely hidden.
7577
/// </summary>
76-
public bool Visible { get; set; }
78+
[DefaultValue(true)]
79+
public bool Visible { get; set; } = true;
7780

7881
/// <summary>
7982
/// Should only be specified for checkbox or radio type menu items.

0 commit comments

Comments
 (0)