I don't yet read your problem in depth. I can only see that you need referenced of mutable page index
to DialogFooterPagenum
. Is a PageIndex
class can solve the problem?
class PageIndex{
private int index;
public int Index{get{return index;}
set{
index = value;
OnPageIndexChange();
}
}
public Action OnPageIndexChange{get;set;} // change this to event-based
}
This way you can keep references to page index.