c# - Is it possible to set a border to overlay (like in photoshop) -
i having quite exotic question: working on "borderless" wpf application. removed standard windows window controls , added own. wanted add border programm. don't want border have specifc color, want in kind of overlay mode when set layer in photoshop overlay. can see mean in example:
i want on left. unfortunately have no idea how. overlay takes background color , makes bit darker. have suggestions do?
edit: here better picture of effect
photoshop mookup2 http://img.xrmb2.net/images/243147.png
edit2 : so, short explanation because may not clear have hoped: not talking semi-transparency. know how that. right box in both images uses that. has black-semitransparent look. while on left set border "overlay" mode. can see gets darker bit stronger in color.
how using transparent
brush?:
<border borderbrush="transparent" borderthickness="5"> ... </border>
update >>>
oh, hold on... see want... try instead semi opaque `brush:
<border borderbrush="3f000000" borderthickness="5"> ... </border>
you can adjust darkness of border
, changing first 2 hexadecimal characters: 3f
.
update >>>
i believe is correct solution. said last:
you can adjust darkness of
border
, changing first 2 hexadecimal characters
so try different values until right balance of opacity. start hardly visible black , increase opacity until right:
<border borderbrush="08000000" borderthickness="5"> ... </border> ... <border borderbrush="0f000000" borderthickness="5"> ... </border> ... <border borderbrush="1f000000" borderthickness="5"> ... </border> ... <border borderbrush="2f000000" borderthickness="5"> ... </border>
if none of these values quite right still, use semi-opaque white instead:
<border borderbrush="2fffffff" borderthickness="5"> ... </border>
Comments
Post a Comment