Exemplo n.º 1
0
        public override OmniXaml.INameScope GetNamescope(object instance)
        {
            var result = instance as OmniXaml.INameScope;

            if (result == null)
            {
                var control = instance as Control;

                if (control != null)
                {
                    var perspexNs = (instance as Perspex.Controls.INameScope) ?? NameScope.GetNameScope(control);

                    if (perspexNs != null)
                    {
                        result = new NameScopeWrapper(perspexNs);
                    }
                }
            }

            return result;
        }
Exemplo n.º 2
0
        public override OmniXaml.INameScope GetNamescope(object instance)
        {
            var result = this.UnderlyingType as OmniXaml.INameScope;

            if (result == null)
            {
                var visual = instance as Visual;

                if (visual != null)
                {
                    var perspexNs = (instance as Perspex.INameScope) ?? NameScope.GetNameScope(visual);

                    if (perspexNs != null)
                    {
                        result = new NameScopeWrapper(perspexNs);
                    }
                }
            }

            return(result);
        }
Exemplo n.º 3
0
        public override OmniXaml.INameScope GetNamescope(object instance)
        {
            var result = instance as OmniXaml.INameScope;

            if (result == null)
            {
                var control = instance as Control;

                if (control != null)
                {
                    var perspexNs = (instance as Perspex.Controls.INameScope) ?? NameScope.GetNameScope(control);

                    if (perspexNs != null)
                    {
                        result = new NameScopeWrapper(perspexNs);
                    }
                }
            }

            return(result);
        }
Exemplo n.º 4
0
        public override OmniXaml.INameScope GetNamescope(object instance)
        {
            var result = this.UnderlyingType as OmniXaml.INameScope;

            if (result == null)
            {
                var visual = instance as Visual;

                if (visual != null)
                {
                    var perspexNs = (instance as Perspex.INameScope) ?? NameScope.GetNameScope(visual);

                    if (perspexNs != null)
                    {
                        result = new NameScopeWrapper(perspexNs);
                    }
                }
            }

            return result;
        }