Example #1
0
        public VisualStateGroup()
        {
            _xamlScope = ResourceResolver.CurrentScope;

            IsAutoPropertyInheritanceEnabled = false;
            InitializeBinder();

            this.RegisterParentChangedCallback(this, OnParentChanged);
        }
Example #2
0
        public FrameworkTemplate(Func <View> factory)
        {
            InitializeBinder();

            _viewFactory = factory;

            // Compute the hash for this template once, it will be used a lot
            // in the ControlPool's internal dictionary.
            _hashCode = (factory.Target?.GetHashCode() ?? 0) ^ factory.Method.GetHashCode();

            _xamlScope = ResourceResolver.CurrentScope;
        }
Example #3
0
        public FrameworkTemplate(object?owner, FrameworkTemplateBuilder?factory)
        {
            InitializeBinder();

            _viewFactory = factory;
            _ownerRef    = WeakReferencePool.RentWeakReference(this, owner);

            // Compute the hash for this template once, it will be used a lot
            // in the ControlPool's internal dictionary.
            _hashCode = (factory?.Target?.GetHashCode() ?? 0) ^ (factory?.Method.GetHashCode() ?? 0);

            _xamlScope = ResourceResolver.CurrentScope;
        }
Example #4
0
 public Style()
 {
     _xamlScope = ResourceResolver.CurrentScope;
 }