c# - Fill xaml rectangle multiples solidcolorbrush -
this type of fill in rectangle in xaml possible?
i don't want use gradient fill rectangle, in image per section using solid colorbrush different.
thanks
try this:
<rectangle width="300" height="100" stroke="black" strokethickness="3"> <rectangle.fill> <lineargradientbrush startpoint="0 0" endpoint="1 0"> <gradientstop color="red" offset="0"/> <gradientstop color="red" offset=".33"/> <gradientstop color="black" offset=".33"/> <gradientstop color="black" offset=".34"/> <gradientstop color="green" offset=".34"/> <gradientstop color="green" offset=".66"/> <gradientstop color="black" offset=".66"/> <gradientstop color="black" offset=".67"/> <gradientstop color="cyan" offset=".67"/> </lineargradientbrush> </rectangle.fill> </rectangle>
Comments
Post a Comment