I'm having trouble on adding a UserControl to my Form.
UserControl Code:
using System;
using System.Windows.Forms;
namespace Most.Mobile.AFV.UI.Controls
{
public partial class ListActionBar : UserControl
{
public ListActionBar()
{
InitializeComponent();
}
public bool ShowKeyboardButton
{
get { return mtbKeyboard.Visible; }
set { mtbKeyboard.Visible = value; }
}
public bool ShowOpenButton
{
get { return mtbMenu.Visible; }
set { mtbMenu.Visible = value; }
}
public bool ShowDeleteButton
{
get { return mtbDelete.Visible; }
set { mtbDelete.Visible = value; }
}
public bool ShowBackButton
{
get { return mtbBack.Visible; }
set { mtbBack.Visible = value; }
}
public bool ShowEditButton
{
get { return mtbEdit.Visible; }
set { mtbEdit.Visible = value; }
}
public bool ShowNewButton
{
get { return mtbNew.Visible; }
set { mtbNew.Visible = value; }
}
public event EventHandler NewClick;
public event EventHandler DeleteClick;
public event EventHandler EditClick;
public event EventHandler OpenClick;
private void mtbBack_Click(object sender, EventArgs e)
{
if (Parent == null)
return;
if (Parent is Form)
(Parent as Form).DialogResult = DialogResult.Cancel;
}
private void mtbKeyboard_Click(object sender, EventArgs e)
{
inp.Enabled = !inp.Enabled;
}
private void mtbNew_Click(object sender, EventArgs e)
{
if (NewClick != null)
NewClick(sender, e);
}
private void mtbEdit_Click(object sender, EventArgs e)
{
if (EditClick != null)
EditClick(sender, e);
}
private void mtbDelete_Click(object sender, EventArgs e)
{
if (DeleteClick != null)
DeleteClick(sender, e);
}
private void mtbMenu_Click(object sender, EventArgs e)
{
if (OpenClick != null)
OpenClick(sender, e);
}
}
}
Below a picture of the error
Error description:
Failed to create component '' 'System.IO.FileLoadException:Could not load file or assembly 'Microsoft.WindowsCE.Forms, Version=3.5.0.0, CUlture=neutral, PublicKeyToken=969db8053d3322ac' or one of its dependencies.