/// <summary> /// Invoked by React to create a new node with the given tag, class /// name, and props. /// </summary> /// <param name="tag">The view tag.</param> /// <param name="className">The class name.</param> /// <param name="rootViewTag">The root view tag.</param> /// <param name="props">The props.</param> public void CreateView(int tag, string className, int rootViewTag, JObject props) { var cssNode = CreateShadowNode(className); var rootNode = _shadowNodeRegistry.GetNode(rootViewTag); cssNode.ReactTag = tag; cssNode.ViewClass = className; cssNode.RootNode = rootNode; cssNode.ThemedContext = rootNode.ThemedContext; _shadowNodeRegistry.AddNode(cssNode); if (props != null) { cssNode.UpdateProps(props); } HandleCreateView(cssNode, rootViewTag, props); }
/// <summary> /// Invoked by React to create a new node with the given tag, class /// name, and properties. /// </summary> /// <param name="tag">The view tag.</param> /// <param name="className">The class name.</param> /// <param name="rootViewTag">The root view tag.</param> /// <param name="props">The properties.</param> public void CreateView(int tag, string className, int rootViewTag, JObject props) { var cssNode = CreateShadowNode(className); var rootNode = _shadowNodeRegistry.GetNode(rootViewTag); cssNode.ReactTag = tag; cssNode.ViewClass = className; cssNode.RootNode = rootNode; cssNode.ThemedContext = rootNode.ThemedContext; _shadowNodeRegistry.AddNode(cssNode); var styles = default(ReactStylesDiffMap); if (props != null) { styles = new ReactStylesDiffMap(props); cssNode.UpdateProperties(styles); } HandleCreateView(cssNode, rootViewTag, styles); }