You need to pass the name of the resource as a parameter to the FindResource method, not the path to the resource. A sample code would look like this:
var icon = (Icon) Application.Current.FindResource("myImage")
Note that in the above code example, "myImage" is the name of the resource.
Refer to the Application.FindResource Method on MSDN.
You say: Application.Current.Resources.Count is zero, this means that you do not have the resources defined in your App.xaml file.
You can add resources to App.xaml as follows:
<Application.Resources> <Image x:Key="myImage" Source="img.png" /> </Application.Resources>
It looks like your icon is an embedded resource. FindResource cannot work with embedded resources. Set the BuildAction your icon to Resource .
Refer to this page to learn more about WPF resources.
UPDATE
Code for accessing embedded resources
Assembly.GetExecutingAssembly().GetManifestResourceStream("myImg.png");
However, if you added this image to Resource.Resx, you should just use Resources.ResourceName .
UPDATE 2
Adding resources to App.xaml or any ResourceDictionary is better, so you can use them as static / dynamic resources using the StaticResource or DynamicResource markup DynamicResource .
If you do not want to add it to App.xaml resources and still want to access it, one option, as I mentioned above, is to add it to Resources.Resx and use Resources.ResourceName to link to the icon / image
Another way is to create System.Drawing.Icon yourself, a sample code:
new System.Drawing.Icon(Application.GetResourceStream(new Uri("/Resources/icon.ico")));
Personally, I would go with XAML resources and add them to App.xaml or ResourceDictionary.