PropertyGrid ValueEditor for a file name

Unanswered PropertyGrid ValueEditor for a file name

  • Tuesday, September 18, 2012 9:12 AM
     
      Has Code

    I have the following rule definition:

    <Rule ...>
      <... />
      <StringProperty Subtype="file" ...>
      <StringProperty.ValueEditors>
        <ValueEditor EditorType="DefaultStringPropertyEditor" DisplayName="&lt;Edit...&gt;"/>
        <ValueEditor EditorType="DefaultFilePropertyEditor" DisplayName="&lt;Browse...&gt;"/>
      </StringProperty.ValueEditors>
      </StringProperty>
      <... />
    </Rule>
    

    It adds the "<Edit...>" and "<Browse...>" options for editing a property, but the Browse dialog asks for an *.exe file, when I need to let user select a *.txt file. There is a combobox in the dialog that allows to choose "All files .", but really that's not an option.

    I have tried to find a solution but this extensibility bit does not seem to be well documented.

All Replies

  • Wednesday, September 19, 2012 5:51 AM
    Moderator
     
     

    Hi Dmitry,

    What is your extensibility?

    What is the rule definition, a setting file or a xaml file?

    Can you show more detail about your extensibility?

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

  • Wednesday, September 19, 2012 8:59 AM
     
     

    Hello Ego,

    The described snippet specifies project properties page. Here is the Rule specification, that I use. Rule definition is and *.xml file. If it matters, this file is included as the ImportAfter for a custom MSBuild platform.

    Changing DefaultFilePropertyEditor to DefaultFolderPropertyEditor changes select *.exe file dialog to select folder dialog. So this part surely works, but still I haven't found any info on how to change the desired file type (even searching for "DefaultFolderPropertyEditor" in Google, quotes included, gives no results).

    Please let me know if you need any further clarification.

    Best regards,

    Dmitry.


    • Edited by DmitryPolyanitsa Wednesday, September 19, 2012 9:00 AM
    • Proposed As Answer by Adam Badura Monday, February 25, 2013 7:01 AM
    • Unproposed As Answer by Adam Badura Monday, February 25, 2013 7:01 AM
    •  
  • Monday, September 24, 2012 3:15 AM
    Moderator
     
     

    Hi Dmitry,

    I'm sorry for long time feedback.

    I can't find how to change the desired file type either. I am doing some researches about it. Wish I can find a way to solve your issue.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

  • Monday, September 24, 2012 8:46 AM
     
     

    Hello Ego,

    Thanks for the answer. I would be satisfied with a work-around for that issue, such is implementing a custom editor from scratch that does what I desire. In that case I'll need to know how to properly create it so I could use it within the Rule declaration.

    Best regards,

    Dmitry

  • Tuesday, September 25, 2012 1:58 AM
    Moderator
     
     

    Hi Dmitry,

    I consult your issue with our expert. Your issue is concerned about MSBuild.

    I'm moving your case to MSBuild forum.

    And I will involve some experts into this issue to see whether they can help you out. There might be some time delay, appreciate for your patience.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, October 12, 2012 9:57 AM
     
     

    Hello Ego,

    Any news?

    Best regards,

    Dmtry

  • Thursday, October 18, 2012 7:13 PM
     
     

    Hello Ego,

    The issue is of high importance to me. Can I have at least a "how-to" on creating my own value editors? I think it will be easy to create the one that I need, I only require the info on including it in the VS.

    Best regards,

    Dmitry