hello guys how r u ?
my question is that, i have to create image border on runtime with gradient using c# in WPF, so how can i make it possible for me
Reply Soon
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Faisal AnsariPosted Apr 12, 2012, 5:35 AM
i am doing like this
control.borderStdImage.BorderBrush = new LinearGradientBrush
{
EndPoint = new Point(0.5, 1),
StartPoint = new Point(0.5, 0)
};
now how can i set color property and offset property in this way ??
SenthilkumarPosted Apr 12, 2012, 5:27 AM
You can try this...
Simply wrap the Image in a Border control
Height="75"
Stretch="Fill"
VerticalAlignment="Top" />
You could also provide a style you apply to images that does this if you don't want to do it around every image
Final solution from answer and comments added by Pax:
VerticalAlignment="Top">
Height="75"
Stretch="Fill"
VerticalAlignment="Top"/>
You can do this in the server side as well.
http://asimsajjad.blogspot.com/2009/02/setting-border-at-runtime-using-c-in.html