Sharing folder between Google Drive users

Today I faced problem, for which the solution is not straight forward. I needed to have a folder, shared between computers at our company. Sounds pretty dull and normal. The trick is, that I want to have it shared even if I am not at the office. So I needed a Cloud solution. Since we use Google Apps at our company, the most useful solution would be to use Google Drive.

Here comes the issue. I know that I can share files and folders between Google users, doing it the old fashioned way, which was possible with Google Docs. Well you can achieve the above, but you need to make a few simple steps.

Step one

Create a folder on account “A”. Let’s call that folder “Cloud Share”


Step two

Go to your Google Drive Web access and share the folder with the account “B”, “C”, etc.


NOTE: Do not forget to give the user “Can edit” permission.

Step three

So far it is our old, well known sharing in Google Docs. But how do we show it in my Google Drive folder?

Well, it is pretty easy. You need to go to the Google Drive Web access on the account “B”, account “C”, etc. and go the the “Shared with me” section. Then check the shared folder and click “Add to My Drive”. And that’s it!


Now everything that anybody changes to this folder’s content will be synced between everybody. Great, easy and free way to collaborate files.

Fixing SkyDrive slow speed

Since some time I was thinking of buying additional space on one of my cloud storage providers. Currently I use DropBox (got 5,4GB so far), SkyDrive (7GB out of the box) and Google Drive (5GB). My favorites are DropBox and SkyDrive. Personally, I think Google Drive is still not very well done.

Looking at the pricings, from DropBox you can get 100GB for about $99 per year, while in SkyDrive, you get 100GB for about $49 per year. And it is even 107GB, since you keep the 7 GB free on top of the 100GB you pay for. This was a winner for me, but I had a problem. The uploading/downloading in SkyDrive is WAY much slower for me, than Dropbox’s. I started digging and it turns out there is a solution for that. Still under the hood one, but it worked for me and led to me buying the 100GB storage.

Here is the article, describing how to fix it:

Silverlight ResourceDictionary Issues

I have been developing WPF/Silverlight Applications about half an year already and I am charmed by the power of those technologies. But still there are some very strange and annoying issues I came upon, especially in my Silverlight implementations. The most favourite one is the one I will be explaining in this post. I am talking about the ResourceDictionary class.

Little intro

ResourceDictionary is a major class in the Silverlight platform, used to hold all the needed resources that you might create and use during your application lifecycle. This includes Custom Templates, Styles, Brushes, Images and many other very cool and useful stuff. This class is used by the runtime in order to choose and apply all these nice peaces you have put in. This brings to mind that this is one of the fundamental classes of the framework and therefore it is very well structured.

The dissapointment

This is where it gets messy. Having in mind that this is a ResourceDictionary you might think that it has all the great features that the standart Dictionary class reveals. Since it is being derived from IEnumerable interface, you might think that you can easily “foreach” that Dictionary and circle aroud your resources. Well you thought wrong ! This is how the GetEnumerator method used by the “foreach” looks like:

throw new NotImplementedException();

So if you try to run this very simple code:

ControlTemplate tmp;
ResourceDictionary dict = new ResourceDictionary();
dict.Add("template1", new ControlTemplate());
dict.Add("template2", new Style());

foreach (object obj in dict)
if (obj is ControlTemplate)
tmp = obj as ControlTemplate;

you will get this nice thingy here:


The sad thing is that this was a behaviour in Silverlight 2 Final release and it is still present in Silverlight 3 Beta. I really hope this will be exposed in the Final release of Silverlight, because personally in my opinion this is quite useful in some complicated scenarios.


This was a problem not being solved in Silverlight 2, but in the 3rd version it has been resolved, so I am not going to brag about it. Still I have been experiencing some difficulties in using them in the generic.xaml, but I am planning to write a separate article on that topic.

The conclusion

I want to say that this article of mine is not intended to mess around with the Silverlight guys from Microsoft. Silverlight is a great technology and I absolutely love it. I have been developing Silverlight applications for almost an year now and I tend to use it in every project I am involved in. I am pointing out those issues just to help the other Silverlight developers, who stumble upon those problems and can’t figure out why. I have spent days trying to fix some of the issues I am writing about and most of the time I spent on figuring out why it is happening. The more developers I can help by sharing my experience the better !

Silverlight Tip: Why do I get “An unhandled exception of type ‘System.OutOfMemoryException’ occurred in Unknown Module.” ?

In the past 4-5 days I have been busy, trying to figure out a VERY strange problem with a PropertyGrid solution we have done in Silverlight. Let me first explain quickly what is the solution about.

This is a PropertyPanel Silverlight control, used to expose the public properties of a bussiness object and allow the user to change them back to the object. Needless to say, the control had to populate these properties via reflection by itself. The tricky part is that we needed to create custom editor controls for each property type.

To make this flexible we added all the property editors as a simple ContentControl and dynamically changed the ControlTemplate of the editor, based on the type of the property.

So far so good. We have implemented the whole mechanism for populating the properties, dynamically creating the ContentControl editors and choosing the ControlTemplate from a list of templates, being predefined.

We have added all those things in a Silverlight Library solution and created another solution (a Silverlight Application, what else ?), where we made a test by passing a custom business object to the control and show it.

Everything went well when we used only the generic build-in controls from the Silverlight SDK for the editors. As soon as I have added a controls from a 3rd Party, or even from System.Windows.Controls, I got the strangest exception on loading:

“An unhandled exception of type ‘System.OutOfMemoryException’ occurred in Unknown Module.”

This was just not enough information. No stack trace, no InnerException, nothing ! I started debugging and pulling out things one by one from the functionality to get to the bottom of the problem. Nothing helped. I spent more than 4 days trying to solve it, but I couldn’t. Finally, while browsing the Google results for the message of the exception, I got to this address:

This is a similar solution by some guys, who faced the same problem. What I have noticed is that they had the problem when the referencing DLLs were broken. As I took a look at our solution I found out that we haven’t referenced the 3rd Party DLLs in the sample solution at all ! I have only referenced them in the Library solution. One might think that this is a normal thing to do, because these DLLs should be exposed to the simple solution by the Library one. Well, one is wrong ! Turned out that Silverlight has some issues on that topic. The exception is totally misleading and if I haven’t found that solution, I wouldn’t had had solved the problem.