public void Expand() { try { this._pattern.Expand(); } catch (System.Runtime.InteropServices.COMException e) { Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; } } }
private bool ExpandListIfNeeded(out ExpandCollapsePattern expandCollapsePattern) { if (!IsExpansionRequired || !Enabled) { expandCollapsePattern = null; return false; } if (!TryGetExpandCollapsePattern(out expandCollapsePattern)) return false; var expansionState = expandCollapsePattern.Current.ExpandCollapseState; if (expansionState != ExpandCollapseState.Collapsed) return false; expandCollapsePattern.Expand(); Thread.Sleep(50); return true; }