// Return unique ID for this element... private object InContextGetRuntimeId(object unused) { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } return(peer.GetRuntimeId()); }