NaturalGroundingPlayer.EditVideoWindow.InstancePopup C# (CSharp) Method

InstancePopup() public static method

Displays a popup containing the FileBinding menu features.
public static InstancePopup ( UIElement target, PlacementMode placement, System.Guid videoId, string fileName, IMediaPlayerBusiness player, ClosingCallback callback ) : EditVideoWindow
target UIElement
placement PlacementMode
videoId System.Guid
fileName string
player IMediaPlayerBusiness
callback ClosingCallback
return EditVideoWindow
        public static EditVideoWindow InstancePopup(UIElement target, PlacementMode placement, Guid? videoId, string fileName, IMediaPlayerBusiness player, ClosingCallback callback) {
            EditVideoWindow NewForm = new EditVideoWindow();
            NewForm.isPopup = true;
            NewForm.videoId = videoId;
            if (videoId != null && videoId != Guid.Empty)
                NewForm.videoId = videoId;
            else
                NewForm.fileName = fileName;
            NewForm.player = player;
            NewForm.callback = callback;
            WindowHelper.SetScale(NewForm.FileBindingButton.ContextMenu);
            NewForm.Window_Loaded(null, null);
            NewForm.ShowFileBindingMenu(target, placement);
            return NewForm;
        }

Usage Example

 private void ShowEditFormPopup(VideoListItem item, UIElement target)
 {
     EditVideoWindow.InstancePopup(target, PlacementMode.Mouse, item.MediaId, item.FileName, EditForm_Closed);
 }