public void Dispose()
 {
     _device.RemoveResizeListener(_resizeListenerId);
 }