UIAutomation.PatternCmdletBase.CallDockPatternForSet C# (CSharp) Method

CallDockPatternForSet() private method

private CallDockPatternForSet ( PatternCmdletBase cmdlet, IUiElement control, IUiElement inputObject, UIANET::System.Windows.Automation position ) : void
cmdlet PatternCmdletBase
control IUiElement
inputObject IUiElement
position UIANET::System.Windows.Automation
return void
        internal void CallDockPatternForSet(PatternCmdletBase cmdlet, IUiElement control, IUiElement inputObject, classic.DockPosition position)
        {
//            try {
//                // 20131208
//                // DockPattern dockPattern = control.GetCurrentPattern(classic.DockPattern.Pattern) as DockPattern;
//                // DockPattern dockPattern = control.GetCurrentPattern<IDockPattern, DockPattern>(classic.DockPattern.Pattern) as DockPattern;
                // 20140102
            try {
                control.PerformSetDockPosition(position);
                if (PassThru) {
                    WriteObject(this, control);
                } else {
                    WriteObject(this, true);
                }
            }
            catch {
                WriteObject(this, false);
            }
//                IDockPattern dockPattern = control.GetCurrentPattern<IDockPattern>(classic.DockPattern.Pattern);
//                if (null != dockPattern) {
//                    dockPattern.SetDockPosition(position);
//                    
//                    if (PassThru && null != (inputObject as IUiElement)) {
//                        WriteObject(this, inputObject);
//                    } else {
//                        WriteObject(this, true);
//                    }
//                } else {
//                    WriteVerbose(this, "couldn't get DockPattern");
//                    WriteObject(this, false);
//                }
//            }
//            catch {
//                
//            }
        }