Thanks, It worked now, although it is kinda ‘hacky’. Can you give me any suggestion on my current approach:
- algorithm calculate
colorDict
-
colorDict
is passed into a Singleton(basically a list of calculated number) calledsession
- create a custom
Eto.Forms.Panel
class, whose contain a private variable pointing tosession
. - In the init function, pass
session
into anEtoCollapsibleSection
class, as shown below.
public ColorScalePanel()
{
EtoCollapsibleSectionHolder holder = new EtoCollapsibleSectionHolder();
ColorScaleSection section1 = new ColorScaleSection(session.depthColorDict);
holder.Add(section1);
TableLayout tableLayout = new TableLayout()
{
Rows =
{
holder
}
};
Content = tableLayout;
}
Afaik, this is basically pointing straight from the “view” Eto.Forms.Panel
to the “model” session
, meaning, there isn’t any “viewModel”’ as all.
Further down the line, If I wanna include the “viewModel”, are the event logics be coded in here ?
Also, I have another problem regarding Eto.Forms.Label
, as shown here.