c# - TemplateBinding a GradientStop Offset -
i'm trying bind gradientstop offset in order display sort of progress bar inside ellipse. customcontrol button , if possible i'd keep way. of course there several dependency properties , offsetprogress 1 of them.
is possible templatebind gradientstop offset?
languages c# xaml wpf.
here's code if thinks can useful:
<ellipse stroke="black" strokethickness="1" stretch="uniform"> <ellipse.fill> <lineargradientbrush endpoint="1,0" startpoint="0,0"> <gradientstop color="{binding path=background.color, relativesource={relativesource mode=templatedparent}}" offset="{templatebinding offsetprogress}" /> <!-- not working --> <gradientstop color="#ffffffff" offset="0.5" /> </lineargradientbrush> </ellipse.fill>
thank you!
Comments
Post a Comment