autocomplete - Customize WPF Toolkit autocompletebox -
wpf toolkit library has autocompletebox control. 1. how place icon @ left of textbox part? 2. how add shadow borders of suggestions popup? changing textboxstyle property not give results.
<!-- xmlns:extendedcontrols="clr-namespace:system.windows.controls;assembly=system.windows.controls.input.toolkit" --> <extendedcontrols:autocompletebox> <extendedcontrols:autocompletebox.textboxstyle> <style targettype="textbox"> <setter property="padding" value="20,0,0,0" /> <setter property="background"> <setter.value> <imagebrush imagesource="/img.png" stretch="none" alignmentx="left" /> </setter.value> </setter> </style> </extendedcontrols:autocompletebox.textboxstyle> </extendedcontrols:autocompletebox>
the autocompletebox have got property : textboxstyle can chose style of textbox. or can in property style :
<usercontrol.resources> <style targettype="textbox" x:key="textboxstyle2"> <setter property="maxlength" value="74" /> <setter property="width" value="300" /> </style> <style targettype="controls:autocompletebox" x:key="textboxstyle"> <setter property="textboxstyle" value="{staticresource textboxstyle2}" /> <setter property="istextcompletionenabled" value="true" /> </style> </usercontrol.resources> /*...*/ <controls:autocompletebox name="titre" style="{staticresource textboxstyle}"/>
but don't know how add shadow. try others properties. =)
edit : change background, there tutoriels. how separate background image in wpf textbox?
exemple :
<style targettype="textbox" x:key="textboxstyle2"> <setter property="maxlength" value="74" /> <setter property="width" value="300" /> <setter property="background"> <setter.value> <imagebrush imagesource="../../../ressources/icones/find_5650.ico" stretch="none" alignmentx="left" alignmenty="top" /> </setter.value> </setter> </style>
Comments
Post a Comment