/// <summary>
        /// Construct a representation of a real remote file (or directory)
        /// </summary>
        /// <param name="app"></param>
        /// <param name="remoteFile"></param>
        private RemoteAppIsoStoreItem(RemoteApplicationEx app, IRemoteFileInfo remoteFile, IRemoteIsolatedStorageFile remoteStore, RemoteAppIsoStoreItem parent)
        {
            RemoteApp = app.RemoteApplication;

            _remoteStore = remoteStore;
            _appEx       = app;
            Parent       = parent;

            RemoteFile = remoteFile;

            // if we can't get the internal object, set it back to the default, which is remoteFile itself.
            // remoteFile only exposes a subset of properties, but these are better than none
            RemoteFileInfo = (object)remoteFile.GetInternalRemoteFileInfo() ?? (object)remoteFile;

            string name = RemoteFile.Name;

            Name = Path.GetFileName(name);

            // "\\Applications\\Data\\8531f2be-f4c3-4822-9fa6-bcc70c9d50a8\\Data\\IsolatedStore\\\\Shared"

            _path = RemoteFile.GetRelativePath();

            // Modern applications are rooted by their IsoStore object so don't need the full path
            if (_path.Contains("%"))
            {
                _path = "";
            }

            if (RemoteFile.IsDirectory())
            {
                Children.Add(new FakeRemoteAppIsoStoreItem(this));
            }
        }
        public RemoteAppIsoStoreItem(RemoteApplicationEx app, string store)
        {
            _appEx       = app;
            Name         = store;
            _remoteStore = app.RemoteApplication.GetIsolatedStore(store);

            // these are all fake directories
            Children.Add(new FakeRemoteAppIsoStoreItem(this));

            IsRemoteStore = true;
        }
        /// <summary>
        /// Construct a new toplevel IsoStore representation for this xap
        /// </summary>
        /// <param name="device"></param>
        /// <param name="xap"></param>
        public RemoteAppIsoStoreItem(IDevice device, RemoteApplicationEx app)
        {
            this._device = device;
            this._appEx  = app;

            this.RemoteApp = app.RemoteApplication;

            // the public constructor is only used to construct the first level
            // which represents the app itself
            Name = app.Name;

            _path = "";

            IsApplication = true;

            // add a fake item so that anyone binding to us will show expanders
            Children.Add(new FakeRemoteAppIsoStoreItem(this));
        }