public void ToolkitStateChanged(int state) { IToolkitEventSink co = this.mControlWeakRef.Target as IToolkitEventSink; if (null != co) { co.ToolkitStateChanged(state); } }
// Process a change in window state from Xsharp. private void WindowStateChanged() { int state; if (IsIconic) { state = 1; // FormWindowState.Minimized. } else if (IsMaximized) { state = 2; // FormWindowState.Maximized. } else { state = 0; // FormWindowState.Normal. } if (sink != null) { sink.ToolkitStateChanged(state); } }