Hi
Has anyone got a better way to do this?
I want to add some menu options which might/might not be available on the WinPart derived controls. Eg export data in the control to a csv, so I added CanExport property which is overriden in the control. And set ActiveWinPart in the ShowWinPart method see below. This will be me a way to export from what ever the ActiveWinPart is.
public partial class WinPart : UserControl
{
private static WinPart _winPart = null;
public WinPart()
{
InitializeComponent();
}
public virtual bool CanExport
{
get
{
return false;
}
}
public static WinPart ActivePart
{
get
{
return _winPart;
}
set
{
_winPart = value;
}
}
private void ShowWinPart(WinPart part)
Copyright (c) Marimer LLC