none
Creating A VSIX Toolbar Button From Text RRS feed

  • Question

  • I have several buttons in a toolbar in my VSIX Extension for which I want to have a single character as the content (for example, a button that just looks like an A or an @). Is there any way to do this without manually creating an image (like you do in XAML)? Thanks.

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Wednesday, April 3, 2019 7:36 PM

All replies

  • Hi,

    Well, it confused me a little bit. You are trying to create a VSIX extension that could give a UWP project template, right? So your problem is that in the UWP project template you want to implement? If you need such a character button not a image button. I thing there are two ways. 

    • Create a custom control and use it as button.
    • You could use TextBlock and click event as button if you don't mind the TextBlock couldn't get focused.

    Best regard,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 4, 2019 6:08 AM
  • I think you misunderstood my question. My VSIX extension is not a project template, I am simply asking about the visual appearance of the toolbar buttons in my VSIX extension (the <Buttons> section of the *.vsct file), the question has nothing to do with UWP at all. If there is a way to use a TextBlock & Click event like you say, I would love it, but if there is, I don't know how to do it (there very well may be, since this is my first VSIX extension, so I wouldn't know). The most I have been able to figure out so far is how to modify the files created by Visual Studio (*.vsct & the *.png files in the Resources folder). Is there a different way to specify the appearance of the buttons (like the TextBlock you mention)?

    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Thursday, April 4, 2019 2:44 PM
  • Hi,

    Since the problem is not related to UWP, I suggest that you might need to ask about this in VS's development forum.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 8, 2019 3:20 AM