c# - WPF: Add a Border inside an element -



c# - WPF: Add a Border inside an element -

i'd know if there way add together border inside image. want "stroke" effect in photoshop when position set inside, i.e. has painted on image. possible?

thank you.

you place border on top of image :

<grid> <image/> <border/> </grid>

if have set cornerradius, , want hide image in corners, that's more complicated, set same border opacitymask image :

<grid> <!-- used rectangle instead of image illustration --> <rectangle width="50" height="50" fill="red"> <rectangle.opacitymask> <visualbrush> <visualbrush.visual> <border width="50" height="50" background="black" cornerradius="10"/> </visualbrush.visual> </visualbrush> </rectangle.opacitymask> </rectangle> </grid>

c# wpf image border

Comments

Popular posts from this blog

ruby on rails - Devise Logout Error in RoR -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

model view controller - MVC Rails Planning -