Ejemplo n.º 1
0
 /// <summary>
 /// Called when the host is shutting down.
 /// </summary>
 public void OnDestroy()
 {
     //_window.SizeChanged -= OnBoundsChanged;
     _uiImplementation.OnShutdown();
     _eventDispatcher.OnDestroy();
     ViewManagersPropertyCache.Clear();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the properties of the node.
        /// </summary>
        /// <param name="props">The properties.</param>
        public void UpdateProperties(ReactStylesDiffMap props)
        {
            var setters = ViewManagersPropertyCache.GetNativePropertySettersForShadowNodeType(GetType());

            foreach (var key in props.Keys)
            {
                if (setters.TryGetValue(key, out var setter))
                {
                    setter.UpdateShadowNodeProperty(this, props);
                }
            }

            OnAfterUpdateTransaction();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Update the properties of the given view.
        /// </summary>
        /// <param name="viewToUpdate">The view to update.</param>
        /// <param name="props">The properties.</param>
        public void UpdateProperties(TFrameworkElement viewToUpdate, ReactStylesDiffMap props)
        {
            var propertySetters =
                ViewManagersPropertyCache.GetNativePropertySettersForViewManagerType(GetType());

            var keys = props.Keys;

            foreach (var key in keys)
            {
                if (propertySetters.TryGetValue(key, out var setter))
                {
                    setter.UpdateViewManagerProperty(this, viewToUpdate, props);
                }
            }

            OnAfterUpdateTransaction(viewToUpdate);
        }
        /// <summary>
        /// Update the properties of the given view.
        /// </summary>
        /// <param name="viewToUpdate">The view to update.</param>
        /// <param name="props">The properties.</param>
        public void UpdateProperties(TDependencyObject viewToUpdate, ReactStylesDiffMap props)
        {
            var propertySetters =
                ViewManagersPropertyCache.GetNativePropertySettersForViewManagerType(GetType());

            var keys = props.Keys;

            foreach (var key in keys)
            {
                var setter = default(IPropertySetter);
                if (propertySetters.TryGetValue(key, out setter))
                {
                    setter.UpdateViewManagerProperty(this, viewToUpdate, props);
                }
            }

            OnAfterUpdateTransaction(viewToUpdate);
        }