c# - WPF clickable area around controls in grid -
i have issue making custom title bar form. contain search textbox aswell few sliders, seen on image: now, imagine title bar - not part of controls (the textbox surrounded border element, , slider) needs mousedownable dragging purposes.
i've tried this:
<grid mousedown="titlegridmousedown"> <grid.columndefinitions> <columndefinition width="135"/> <columndefinition width="auto"/> <columndefinition width="*"/> <columndefinition width="200"/> </grid.columndefinitions> <slider grid.column="1" margin="5 15 5 0" width="100" mousedown="titlegridmousedown"/> <slider grid.column="2" margin="5 15 5 0"/> <border grid.column="3" cornerradius="10" borderthickness="1" borderbrush="white" width="180" height="20" background="white"> <textbox background="transparent" borderthickness="0" height="20"/> </border> </grid>
however it's of no avail. there's small part between 2 sliders, few pixel area, works (dragmove(); in event itself). don't have awful lot of experience type of things in wpf, feels me area shrinks control. instance, nothing changes if place border object button , try bind event button.
how should approach this?
your problem here want capture mousedown
event on grid element. since grid has no background set, defaulted null. mousedown
event not raised. think of going through grid without hitting it. background=transparent
on top grid should solve problem.
Comments
Post a Comment