

C# UserControl
Mám na UserControlu button s kterým potřebuji zobrazovat a skrývat jiný UserControlu.
Tak mi to nefunguje.
namespace TextEdit01
{
public partial class ucDrahovyPohyb : UserControl
{
public ucDrahovyPohyb()
{
InitializeComponent();
}
private void btnPrimka_Click(object sender, EventArgs e)
{
if (ucDrPoPrimka1.Visible)
{
ucDrPoPrimka1.Visible = false;
}
else
{
ucDrPoPrimka1.Visible = true;
}
}
}
}