No IsolatedStorageSettings in WPF?

368 views
Skip to first unread message

rudigrobler

unread,
Jan 30, 2009, 5:04:20 AM1/30/09
to WPF Disciples
Why is their no IsolatedStorageSettings in WPF? I have a application
framework that I want to use in WPF and Silverlight... the SL version
currently uses IsolatedStorageSettings but it is not available in WPF?

Shawn Wildermuth

unread,
Jan 30, 2009, 5:13:30 AM1/30/09
to wpf-di...@googlegroups.com
Isolated storage is available in standard desktop .net:

http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedst
oragefile.aspx

Thanks,

Shawn Wildermuth
http://wildermuth.com
https://agilitrain.com
Microsoft MVP (C#), MCSD.NET, Author and Speaker

The Silverlight Tour is coming to a city near you!

Laurent Bugnion, GalaSoft [MVP, MCP]

unread,
Jan 30, 2009, 5:12:13 AM1/30/09
to wpf-di...@googlegroups.com
Yes, but not the *Settings version.

Generally speaking IsolatedStorage is more complex in WPF than in
Silverlight. This is again the famous story:

1) They implemented it in WPF
2) They implemented it in Silverlight
3) They saw that it was cumbersome and simplify it in Silverlight (the
*Settings class came only later to SL, it was not in the beta, IIRC)
4) This will flow back into WPF but not yet.

Cheers,
Laurent

http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedst
oragefile.aspx

Thanks,

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.233 / Virus Database: 270.10.15/1924 - Release Date: 01/29/09
17:57:00

Corrado Cavalli

unread,
Jan 30, 2009, 5:17:50 AM1/30/09
to wpf-di...@googlegroups.com
Is in System.Io.IsolalatedStorage namespace...

rudigrobler

unread,
Jan 30, 2009, 5:31:01 AM1/30/09
to WPF Disciples
I have to confirm what Laurent said...

I need the IsolatedStorageSettings (*Settings) which isn't available
yet? Will we have it someday?

On Jan 30, 12:12 pm, "Laurent Bugnion, GalaSoft [MVP, MCP]"
<laur...@galasoft.ch> wrote:
> Yes, but not the *Settings version.
>
> Generally speaking IsolatedStorage is more complex in WPF than in
> Silverlight. This is again the famous story:
>
> 1) They implemented it in WPF
> 2) They implemented it in Silverlight
> 3) They saw that it was cumbersome and simplify it in Silverlight (the
> *Settings class came only later to SL, it was not in the beta, IIRC)
> 4) This will flow back into WPF but not yet.
>
> Cheers,
> Laurent
>
>
>
> -----Original Message-----
> From: wpf-di...@googlegroups.com [mailto:wpf-di...@googlegroups.com]
>
> On Behalf Of Shawn Wildermuth
> Sent: Friday, January 30, 2009 11:14 AM
> To: wpf-di...@googlegroups.com
> Subject: [WPF Disciples] Re: No IsolatedStorageSettings in WPF?
>
> Isolated storage is available in standard desktop .net:
>
> http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.iso...
> oragefile.aspx
>
> Thanks,
>
> Shawn Wildermuthhttp://wildermuth.comhttps://agilitrain.com
> Microsoft MVP (C#), MCSD.NET, Author and Speaker
>
> The Silverlight Tour is coming to a city near you!
>
> -----Original Message-----
> From: wpf-di...@googlegroups.com [mailto:wpf-di...@googlegroups.com]
> On Behalf Of rudigrobler
> Sent: Friday, January 30, 2009 5:04 AM
> To: WPF Disciples
> Subject: [WPF Disciples] No IsolatedStorageSettings in WPF?
>
> Why is their no IsolatedStorageSettings in WPF? I have a application
> framework that I want to use in WPF and Silverlight... the SL version
> currently uses IsolatedStorageSettings but it is not available in WPF?
>
> No virus found in this incoming message.
> Checked by AVG -www.avg.com
> Version: 8.0.233 / Virus Database: 270.10.15/1924 - Release Date: 01/29/09
> 17:57:00- Hide quoted text -
>
> - Show quoted text -

Laurent Bugnion, GalaSoft [MVP, MCP]

unread,
Jan 30, 2009, 5:56:43 AM1/30/09
to wpf-di...@googlegroups.com
Trying to remember what I heard. I *think* they said they want to flow it
back to WPF but I might be wrong (though it would be TERRIBLE if they
didn't, did I say already how much I want Silverlight to be a true subset of
WPF? ;))

Maybe Jaime can help.

Laurent Bugnion, GalaSoft [MVP, MCP]

unread,
Jan 30, 2009, 5:59:45 AM1/30/09
to wpf-di...@googlegroups.com
Just asked the Silverlight insiders group about that. I might not be able to
post the reply on this group though (because of NDA).

rudigrobler

unread,
Jan 30, 2009, 6:16:30 AM1/30/09
to WPF Disciples
I had a look at the IsolatedStorageSettings using reflector... its
pretty easy to create your own IsolatedStorageSettings! i cant believe
its not ported yet... its such a simple class!

Peter O'Hanlon

unread,
Jan 30, 2009, 6:34:44 AM1/30/09
to wpf-di...@googlegroups.com
I think it might be to do with the missing IsolatedStorageFile functionality in mscorlib that's implemented in the Silverlight version of mscorlib.
--
Peter O'Hanlon

rudigrobler

unread,
Jan 30, 2009, 6:51:38 AM1/30/09
to WPF Disciples
Ok, I downloaded IsolatedStorageSettings.cs from moonlight (http://
anonsvn.mono-project.com/viewvc/trunk/moon/class/System.Windows/
System.IO.IsolatedStorage/IsolatedStorageSettings.cs?view=log)

Only needed to make 3 or 4 changes and now it is working

Peter, IsolatedStorageFile is available... I think the only reason its
not implemented is because IsolatedStorageSettings internally uses
IsolatedStorageFile.GetUserStoreForSite() which isn;t available in
WPF! I just forced it to use
IsolatedStorageFile.GetUserStoreForApplication()!

I know this is a edge case and not a lot of people will need this but
I am trying to use as much of the same code in WPF and SL!!!

Peter O'Hanlon

unread,
Jan 30, 2009, 6:58:40 AM1/30/09
to wpf-di...@googlegroups.com
Good job, and yes the GetUserStoreForSite was the method I was referring to. Obviously, it's only present in the Silverlight version of mscorlib.
--
Peter O'Hanlon

Laurent Bugnion, GalaSoft [MVP, MCP]

unread,
Jan 30, 2009, 7:10:19 AM1/30/09
to wpf-di...@googlegroups.com
Hey Rudi,

I am sure it's just a timing problem. As I told you, IsolatedStorageSettings
was added to Silverlight quite late in the process. Cannot recall exactly
when, but after .NET 3.5 SP1.

Cheers,
Laurent

-----Original Message-----
From: wpf-di...@googlegroups.com [mailto:wpf-di...@googlegroups.com]
On Behalf Of rudigrobler
Sent: Friday, January 30, 2009 12:17 PM
To: WPF Disciples
Subject: [WPF Disciples] Re: No IsolatedStorageSettings in WPF?

I had a look at the IsolatedStorageSettings using reflector... its
pretty easy to create your own IsolatedStorageSettings! i cant believe
its not ported yet... its such a simple class!

Peter O'Hanlon

unread,
Jan 30, 2009, 7:11:20 AM1/30/09
to wpf-di...@googlegroups.com
I'm looking at this now - it seems to be an easy enough port. Thanks for the link Rudi.

On Fri, Jan 30, 2009 at 11:51 AM, rudigrobler <rudi.g...@gmail.com> wrote:



--
Peter O'Hanlon
Reply all
Reply to author
Forward
0 new messages