Aspose::Words::WebExtensions::WebExtensionPropertyCollection Class Reference

Detailed Description

Specifies a set of web extension custom properties.

Examples

Shows how to add a web extension to a document.

auto doc = MakeObject<Document>();
// Create task pane with "MyScript" add-in, which will be used by the document,
// then set its default location.
auto myScriptTaskPane = MakeObject<TaskPane>();
doc->get_WebExtensionTaskPanes()->Add(myScriptTaskPane);
myScriptTaskPane->set_DockState(TaskPaneDockState::Right);
myScriptTaskPane->set_IsVisible(true);
myScriptTaskPane->set_Width(300);
myScriptTaskPane->set_IsLocked(true);
// If there are multiple task panes in the same docking location, we can set this index to arrange them.
myScriptTaskPane->set_Row(1);
// Create an add-in called "MyScript Math Sample", which the task pane will display within.
SharedPtr<WebExtension> webExtension = myScriptTaskPane->get_WebExtension();
// Set application store reference parameters for our add-in, such as the ID.
webExtension->get_Reference()->set_Id(u"WA104380646");
webExtension->get_Reference()->set_Version(u"1.0.0.0");
webExtension->get_Reference()->set_StoreType(WebExtensionStoreType::OMEX);
webExtension->get_Reference()->set_Store(System::Globalization::CultureInfo::get_CurrentCulture()->get_Name());
webExtension->get_Properties()->Add(MakeObject<WebExtensionProperty>(u"MyScript", u"MyScript Math Sample"));
webExtension->get_Bindings()->Add(MakeObject<WebExtensionBinding>(u"MyScript", WebExtensionBindingType::Text, u"104380646"));
// Allow the user to interact with the add-in.
webExtension->set_IsFrozen(false);
// We can access the web extension in Microsoft Word via Developer -> Add-ins.
doc->Save(ArtifactsDir + u"Document.WebExtension.docx");
// Remove all web extension task panes at once like this.
doc->get_WebExtensionTaskPanes()->Clear();
ASSERT_EQ(0, doc->get_WebExtensionTaskPanes()->get_Count());

#include <Aspose.Words.Cpp/WebExtensions/WebExtensionPropertyCollection.h>

+ Inheritance diagram for Aspose::Words::WebExtensions::WebExtensionPropertyCollection:

Public Member Functions

virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void SetTemplateWeakPtr (uint32_t argument) override
 

Static Public Member Functions

static const TypeInfoType ()
 

Member Function Documentation

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::WebExtensions::WebExtensionPropertyCollection::GetType ( ) const
overridevirtual

Reimplemented from System::Object.

◆ Is()

virtual bool Aspose::Words::WebExtensions::WebExtensionPropertyCollection::Is ( const System::TypeInfo target) const
overridevirtual

Reimplemented from System::Object.

◆ SetTemplateWeakPtr()

void Aspose::Words::WebExtensions::WebExtensionPropertyCollection::SetTemplateWeakPtr ( uint32_t  argument)
overridevirtual

Reimplemented from System::Object.

◆ Type()

static const System::TypeInfo& Aspose::Words::WebExtensions::WebExtensionPropertyCollection::Type ( )
static