Aspose::Words::Markup::StructuredDocumentTagRangeStart class

StructuredDocumentTagRangeStart class

Represents a start of ranged structured document tag which accepts multi-sections content. See also StructuredDocumentTagRangeEnd. To learn more, visit the Structured Document Tags or Content Control documentation article.

class StructuredDocumentTagRangeStart : public Aspose::Words::Node,
                                        public System::Collections::Generic::IEnumerable<System::SharedPtr<Aspose::Words::Node>>,
                                        public Aspose::Words::Markup::IStructuredDocumentTag

Methods

MethodDescription
Accept(System::SharedPtr<Aspose::Words::DocumentVisitor>) overrideAccepts a visitor.
AppendChild(const System::SharedPtr<Aspose::Words::Node>&)Adds the specified node to the end of the stdContent range.
Clone(bool)Creates a duplicate of the node.
get_Appearance() overrideGets the appearance of the structured document tag.
get_Color() overrideGets or sets the color of the structured document tag.
get_CustomNodeId() constSpecifies custom node identifier.
virtual get_Document() constGets the document to which this node belongs.
get_Id() overrideSpecifies a unique read-only persistent numerical Id for this structured document tag.
virtual get_IsComposite()Returns true if this node can contain other nodes.
get_IsShowingPlaceholderText() overrideSpecifies whether the content of this structured document tag shall be interpreted to contain placeholder text (as opposed to regular text contents within the structured document tag). if set to true, this state shall be resumed (showing placeholder text) upon opening this document.
get_LastChild()Gets the last child in the stdContent range.
get_Level() const overrideGets the level at which this structured document tag range start occurs in the document tree.
get_LockContentControl() overrideWhen set to true, this property will prohibit a user from deleting this structured document tag.
get_LockContents() overrideWhen set to true, this property will prohibit a user from editing the contents of this structured document tag.
get_NextNode() const
get_NextSibling()Gets the node immediately following this node.
get_NodeType() const overrideReturns StructuredDocumentTagRangeStart.
get_ParentNode()Gets the immediate parent of this node.
get_Placeholder() overrideGets the BuildingBlock containing placeholder text which should be displayed when this structured document tag run contents are empty, the associated mapped XML element is empty as specified via the XmlMapping element or the IsShowingPlaceholderText element is true.
get_PlaceholderName() overrideGets or sets Name of the BuildingBlock containing placeholder text.
get_PreviousSibling()Gets the node immediately preceding this node.
get_PrevNode() const
get_Range()Returns a Range object that represents the portion of a document that is contained in this node.
get_RangeEnd()Specifies end of range if the StructuredDocumentTag is a ranged structured document tag. Otherwise returns null.
get_SdtType() overrideGets type of this structured document tag.
get_Tag() const overrideSpecifies a tag associated with the current structured document tag node. Can not be null.
get_Title() const overrideSpecifies the friendly name associated with this structured document tag. Can not be null.
get_WordOpenXML() overrideGets a string that represents the XML contained within the node in the FlatOpc format.
get_WordOpenXMLMinimal()Gets a string that represents the XML contained within the node in the FlatOpc format. Unlike the WordOpenXML property, this method generates a stripped-down document that excludes any non-content-related parts.
get_XmlMapping() overrideGets an object that represents the mapping of this structured document tag range to XML data in a custom XML part of the current document.
GetAncestor(Aspose::Words::NodeType)Gets the first ancestor of the specified NodeType.
GetAncestorOf()
GetChildNodes(Aspose::Words::NodeType, bool) overrideReturns a live collection of child nodes that match the specified types.
GetEnumerator() overrideProvides support for the for each style iteration over the child nodes of this node.
virtual GetText()Gets the text of this node and of all its children.
GetType() const override
Is(const System::TypeInfo&) const override
IsAncestorNode(const System::SharedPtr<Aspose::Words::Node>&)
NextPreOrder(const System::SharedPtr<Aspose::Words::Node>&)Gets next node according to the pre-order tree traversal algorithm.
static NodeTypeToString(Aspose::Words::NodeType)A utility method that converts a node type enum value into a user friendly string.
PreviousPreOrder(const System::SharedPtr<Aspose::Words::Node>&)Gets the previous node according to the pre-order tree traversal algorithm.
Remove()Removes itself from the parent.
RemoveAllChildren()Removes all the nodes between this range start node and the range end node.
RemoveSelfOnly() overrideRemoves this range start and appropriate range end nodes of the structured document tag, but keeps its content inside the document tree.
set_Appearance(Aspose::Words::Markup::SdtAppearance) overrideSets the appearance of the structured document tag.
set_Color(System::Drawing::Color) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_Color.
set_CustomNodeId(int32_t)Setter for Aspose::Words::Node::get_CustomNodeId.
set_IsShowingPlaceholderText(bool) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_IsShowingPlaceholderText.
set_LockContentControl(bool) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_LockContentControl.
set_LockContents(bool) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_LockContents.
set_NextNode(const System::SharedPtr<Aspose::Words::Node>&)
set_PlaceholderName(System::String) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_PlaceholderName.
set_PrevNode(const System::SharedPtr<Aspose::Words::Node>&)
set_Tag(System::String) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_Tag.
set_Title(System::String) overrideSetter for Aspose::Words::Markup::StructuredDocumentTagRangeStart::get_Title.
SetParent(const System::SharedPtr<Aspose::Words::Node>&)
SetTemplateWeakPtr(uint32_t) override
StructuredDocumentTagRangeStart(const System::SharedPtr<Aspose::Words::DocumentBase>&, Aspose::Words::Markup::SdtType)Initializes a new instance of the Structured document tag range start class.
ToString(Aspose::Words::SaveFormat)Exports the content of the node into a string in the specified format.
ToString(const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&)Exports the content of the node into a string using the specified save options.
static Type()

Examples

Shows how to get the properties of multi-section structured document tags.

auto doc = MakeObject<Document>(MyDir + u"Multi-section structured document tags.docx");

auto rangeStartTag =
    System::AsCast<StructuredDocumentTagRangeStart>(doc->GetChildNodes(NodeType::StructuredDocumentTagRangeStart, true)->idx_get(0));
auto rangeEndTag =
    System::AsCast<StructuredDocumentTagRangeEnd>(doc->GetChildNodes(NodeType::StructuredDocumentTagRangeEnd, true)->idx_get(0));

std::cout << "StructuredDocumentTagRangeStart values:" << std::endl;
std::cout << "\t|Id: " << rangeStartTag->get_Id() << std::endl;
std::cout << "\t|Title: " << rangeStartTag->get_Title() << std::endl;
std::cout << "\t|PlaceholderName: " << rangeStartTag->get_PlaceholderName() << std::endl;
std::cout << String::Format(u"\t|IsShowingPlaceholderText: {0}", rangeStartTag->get_IsShowingPlaceholderText()) << std::endl;
std::cout << String::Format(u"\t|LockContentControl: {0}", rangeStartTag->get_LockContentControl()) << std::endl;
std::cout << String::Format(u"\t|LockContents: {0}", rangeStartTag->get_LockContents()) << std::endl;
std::cout << String::Format(u"\t|Level: {0}", rangeStartTag->get_Level()) << std::endl;
std::cout << String::Format(u"\t|NodeType: {0}", rangeStartTag->get_NodeType()) << std::endl;
std::cout << "\t|RangeEnd: " << rangeStartTag->get_RangeEnd() << std::endl;
std::cout << "\t|Color: " << rangeStartTag->get_Color().ToArgb() << std::endl;
std::cout << String::Format(u"\t|SdtType: {0}", rangeStartTag->get_SdtType()) << std::endl;
std::cout << "\t|Tag: " << rangeStartTag->get_Tag() << "\n" << std::endl;

std::cout << "StructuredDocumentTagRangeEnd values:" << std::endl;
std::cout << "\t|Id: " << rangeEndTag->get_Id() << std::endl;
std::cout << String::Format(u"\t|NodeType: {0}", rangeEndTag->get_NodeType()) << std::endl;

See Also