why is the grid border visable in the app?

Thomas Fischer 21 Reputation points
2020-07-20T20:37:31.733+00:00

I created a button and the grid appears to have a rectangular black border around the button, when I build and run the app. When I click on it in the app it disappears. How do I prevent this border from appearing in the app?

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-07-21T01:37:03.63+00:00

    Hello,

    Welcome to Microsoft Q&A.

    What you see is the style change of the Button in the PointerOver state.

    In the default control template, it behaves as follows:

    13122-defaultbuttonpointeroverstate.txt

    If you only need Button not to display Border, you can set it like this:

    <Button BorderThickness="0"   
                   ... />  
    

    If you need to modify the different behavior of Button in each state, you can refer to this document:

    Control templates

    The complete Button default style is defined here:

    13194-defaultbuttoncontroltemplate.txt

    Thanks.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.