Skip to main content

ASPxClientHtmlEditorChangeMediaElementCommandArguments.GetCommandName Method

Returns the name of the client-side command corresponding to the parameter.

Declaration

GetCommandName(): string

Returns

Type Description
string

One of the ASPxClientCommandConsts values corresponds to the type of the parameter.

Remarks

The following table lists the ASPxClientHtmlEditorChangeMediaElementCommandArguments class descendants and the client-side command names corresponding to each of them.

A parameter type The name of the command
ASPxClientHtmlEditorChangeAudioCommandArguments “changeaudio” (ASPxClientCommandConsts.CHANGEAUDIO_COMMAND)
ASPxClientHtmlEditorChangeFlashCommandArguments “changeflash” (ASPxClientCommandConsts.CHANGEFLASH_COMMAND)
ASPxClientHtmlEditorChangeVideoCommandArguments “changevideo” (ASPxClientCommandConsts.CHANGEVIDEO_COMMAND)
ASPxClientHtmlEditorChangeYouTubeVideoCommandArguments “changeyoutubevideo” (ASPxClientCommandConsts.CHANGEYOUTUBEVIDEO_COMMAND)
// Changing the selected video element's margins
var video = htmlEditor.GetSelection().GetSelectedElement();
var args = htmlEditor.CreateChangeMediaElementCommandArguments(video);
args.styleSettings.marginTop = "10px";
args.styleSettings.marginRight = "5px";
args.styleSettings.marginBottom = "15px";
args.styleSettings.marginLeft = "20px";
htmlEditor.ExecuteCommand(args.GetCommandName(), args);
See Also