DropdownMenu icon indicating copy to clipboard operation
DropdownMenu copied to clipboard

Inconsistent accessibility: parameter type 'ItemMenu' in UserControlMenuItem.xaml.cs

Open Muhammad-Jafar opened this issue 5 years ago • 0 comments

i found this error, i dont know why. in * . . . public UserControlMenuItem(ItemMenu itemMenu) . . . .* i just repo your code and its really work. But, when im trying it myself. i dont know how to fix it. can you help me. please.

Error CS0051 Inconsistent accessibility: parameter type 'ItemMenu' is less accessible than method 'UserControlMenuItem.UserControlMenuItem(ItemMenu)'

this is my code :

using BUMDES.ViewModels; using System.Windows; using System.Windows.Controls;

namespace BUMDES { public partial class UserControlMenuItem : UserControl { public UserControlMenuItem(ItemMenu itemMenu) { InitializeComponent(); ExpanderMenu.Visibility = itemMenu.SubItems == null ? Visibility.Collapsed : Visibility.Visible; ListViewItemMenu.Visibility = itemMenu.SubItems == null ? Visibility.Visible : Visibility.Collapsed; this.DataContext = itemMenu; } } }

im new in programer in WPF and still learn

Muhammad-Jafar avatar Oct 24 '20 14:10 Muhammad-Jafar