Пример #1
0
        private void OnCustomExpression(object sender, EventArgs e)
        {
            var customExpressionView = new CustomExpressionView(this.hostResources, viewModel)
            {
                Appearance = EffectiveAppearance
            };

            var customExpressionPopOver = new AutoClosePopOver {
                ContentViewController = new NSViewController(null, null)
                {
                    View = customExpressionView
                },
            };

            customExpressionPopOver.SetAppearance(this.hostResources.GetVibrantAppearance(EffectiveAppearance));

            customExpressionPopOver.Show(customExpressionView.Frame, (NSView)this, NSRectEdge.MinYEdge);
        }
Пример #2
0
        private void OnResourceRequested(object sender, EventArgs e)
        {
            var requestResourceView = new RequestResourceView(this.hostResources, this.viewModel)
            {
                Appearance = EffectiveAppearance
            };

            var resourceSelectorPopOver = new AutoClosePopOver {
                ContentViewController = new NSViewController(null, null)
                {
                    View = requestResourceView
                },
            };

            resourceSelectorPopOver.SetAppearance(this.hostResources.GetVibrantAppearance(EffectiveAppearance));

            requestResourceView.PopOver = resourceSelectorPopOver;

            resourceSelectorPopOver.Show(requestResourceView.Frame, (NSView)this, NSRectEdge.MinYEdge);
        }