Beispiel #1
0
        protected override void OnShown()
        {
            var lol = new WindowDelegate();

            Window.Delegate = lol;

            lol.ResizeRequested += (s, e) => {
                ResizeRequested?.Invoke(this, EventArgs.Empty);
            };

            lol.MovedRequested += (s, e) => {
                MovedRequested?.Invoke(this, EventArgs.Empty);
            };

            lol.LostFocus += (s, e) => {
                LostFocus?.Invoke(this, EventArgs.Empty);
            };

            lol.BecomeMainWindow += (s, e) => {
                OnBecomeMainWindow(this, EventArgs.Empty);
            };

            lol.BecomeKeyWindow += (sender, e) => {
                GotFocus?.Invoke(this, EventArgs.Empty);
            };

            base.OnShown();
        }
Beispiel #2
0
        void Initialize()
        {
            window.DidResize += (s, e) => {
                ResizeRequested?.Invoke(this, EventArgs.Empty);
            };

            window.DidMove += (s, e) => {
                MovedRequested?.Invoke(this, EventArgs.Empty);
            };

            window.DidResignKey += (s, e) => {
                LostFocus?.Invoke(this, EventArgs.Empty);
            };
        }
Beispiel #3
0
        protected override void OnShown()
        {
            Window.DidResize += (s, e) => {
                ResizeRequested?.Invoke(this, EventArgs.Empty);
            };

            Window.DidMove += (s, e) => {
                MovedRequested?.Invoke(this, EventArgs.Empty);
            };

            Window.DidResignKey += (s, e) => {
                LostFocus?.Invoke(this, EventArgs.Empty);
            };

            Window.DidBecomeMain += (s, e) => {
                OnBecomeMainWindow(this, EventArgs.Empty);
            };

            Window.DidBecomeKey += (sender, e) => {
            };

            base.OnShown();
        }
Beispiel #4
0
 protected override void OnSizeRequested(ref Requisition requisition)
 {
     ResizeRequested?.Invoke(this, EventArgs.Empty);
     base.OnSizeRequested(ref requisition);
 }
Beispiel #5
0
 public override void DidResize(NSNotification notification)
 {
     ResizeRequested?.Invoke(this, EventArgs.Empty);
 }