コード例 #1
0
 /// <summary>
 /// Updates existing element properties.
 /// </summary>
 /// <remarks>Used with template based rendering.</remarks>
 /// <param name="element"></param>
 /// <param name="prop"></param>
 public void UpdateExistingElement(TElement element, ISharpProp prop)
 {
     prop.Init();
     prop.Component.WillMount();
     // UpdateElement expects all sub-elements to be created and be in proper position in list.
     prop.Component.UpdateElement(this, element, prop);
     prop.Component.DidMount();
 }
コード例 #2
0
        public (ISharpStatefulComponent Stateful, ISharpNativeComponent Native) CreateNewComponent(ISharpProp next)
        {
            next.Init();
            var statefulComponent = next.Component;

            statefulComponent.Renderer = this;
            var nativeCurrent = statefulComponent as ISharpNativeComponent;

            statefulComponent.WillMount();
            if (nativeCurrent != null)
            {
                CreateElement(nativeCurrent);
            }
            statefulComponent.DidMount();
            return(statefulComponent, nativeCurrent);
        }