wpf - Cannot find governing FrameworkElement or FrameworkContentElement for target element. GradientStop -
i have list box contains colors , each color have 7 heads choose print head color. binding variable when print head selected , color box should have styles.
<setter targetname="colorselectionrectangle" property="fill"> <setter.value> <lineargradientbrush spreadmethod="repeat" startpoint="0,0" endpoint="25,25"> <lineargradientbrush.relativetransform> <scaletransform scalex="0.01" scaley="0.01" /> </lineargradientbrush.relativetransform> <gradientstop offset="0" color="white" /> <gradientstop offset="0.5" color="white" /> <gradientstop offset="0.5" color="{binding [0].item.printcolor.argb}" /> <gradientstop offset="1" color="{binding [0].item.printcolor.argb}" /> </lineargradientbrush> </setter.value>
and error :
system.windows.data error: 2 : cannot find governing frameworkelement or frameworkcontentelement target element. bindingexpression:path=[0].item.printcolor.argb; dataitem=null; target element 'gradientstop' (hashcode=52327179); target property 'color' (type 'color')
i believe have problem because gradientstop
not frameworkelement
... msdn:
system.object system.windows.threading.dispatcherobject system.windows.dependencyobject system.windows.freezable system.windows.media.animation.animatable system.windows.media.gradientstop
if notice extended system.windows.freezable
class above, see class 'freezable'... means cannot modified. see freezable objects overview page @ msdn more information.
Comments
Post a Comment