xaml - WPF Background Two Tone -


i'm trying simple cannot anywhere it. i've been trawling net trying find clear example or tit bit of information every article find showing exact same simple example.

all want have background list box item 2 tone without gradial blend between them. far have:

<setter property="background" >     <setter.value>         <lineargradientbrush startpoint="0,0" endpoint="0,1">             <gradientstop color="#acc6e0" offset="0"/>             <gradientstop color="#dce7f5" offset="1"/>         </lineargradientbrush>     </setter.value> </setter> 

i've tried plenty of different things end variant of gradual gradient not 2 tone equal split.

many thanks

paul

just add 2 stops @ same offset:

    <lineargradientbrush startpoint="0,0" endpoint="0,1">         <gradientstop color="#acc6e0" offset="0"/>         <gradientstop color="#acc6e0" offset="0.5"/>         <gradientstop color="#dce7f5" offset="0.5"/>         <gradientstop color="#dce7f5" offset="1"/>     </lineargradientbrush> 

in fact can drop end points:

    <lineargradientbrush startpoint="0,0" endpoint="0,1">         <gradientstop color="#acc6e0" offset="0.5"/>         <gradientstop color="#dce7f5" offset="0.5"/>     </lineargradientbrush> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -