This is a migrated thread and some comments may be shown as answers.

How to delete Telerik.Web.UI.BinaryImageCropPosition and Telerik.Web.UI.BinaryImageResizeMode type resources from resource file?

1 Answer 32 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Jongalala
Top achievements
Rank 1
Jongalala asked on 28 Jan 2014, 12:07 PM
I am using RadBinaryImage in my asp.net site. I want the website to be localized. So when I generate resources using "Generate Local Resources" from tools menu then Telerik.Web.UI.BinaryImageCropPosition and Telerik.Web.UI.BinaryImageResizeMode type resources are added to my resource file. But I can only keep string type resources in my resource file. So I need to delete these type of resources and I need to delete these type of resources programmatically. I need to iterate through all my resource files programmatically for some filtering. But I can't iterate for these resources.

using (ResXResourceReader resReader = new ResXResourceReader(filePath))
                    {
                        using (ResXResourceWriter resWriter = new ResXResourceWriter(filePath))
                        {
                            foreach (DictionaryEntry dictionaryEntry in resReader)
                            {

I am using ResXResourceReader to read. Here 'filePath' is the path of a resource. When I go to iterate through the resources the foreach throws an exception for these two type of resources.So I need to delete them. Or I need to find a way to iterate through the resources without exception. But I couldn't find a way. 

Any help for iterating through the resources without exception will also be appreciated. Please Help...



1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 31 Jan 2014, 09:14 AM
Hi Jongalala,

We will fix this, as these two properties should not have Localizable attribute.

To handle the exception you can use loop using
foreach (var dictionaryEntry in resReader)
And then check if dictionaryEntry is specific type.

Regards,
Vasil
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
BinaryImage
Asked by
Jongalala
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or