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

2 posts, 0 answers
  1. Jongalala
    Jongalala avatar
    7 posts
    Member since:
    Jul 2013

    Posted 28 Jan 2014 Link to this post

    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...



  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 31 Jan 2014 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top