Having Two Buttons does not render but one button does
var
margin = 3;//adjust button size
function
buttonloaded(sender, eventargs){
var text = sender.findname(sender.name + "_text");text[
"canvas.top"] = margin;text[
"canvas.left"] = margin; var rectangle = sender.findname(sender.name + "_rectangle");rectangle.width = text.actualwidth + margin * 2;
rectangle.height = text.actualheight + margin * 2;
sender.width = rectangle.width;
sender.height = rectangle.height;
}
button-->
button-->
try changing names of gradient stops in second button:
<canvas x:name="button2" canvas.top="20" loaded=buttonloaded">
<rectangle x:name="button2_rectangle" stroke="#ff8e8e8e" strokethickness="2" radiusx="2" radiusy="2">
<rectangle.fill>
<lineargradientbrush x:name="button2_rectanglebrush" startpoint="0.5,2.109" endpoint="0.5,-1.109">
<gradientstop x:name="gradientstop3" color="#ffff9e00" offset="1" />
<gradientstop x:name="gradientstop4" color="#ffeaeaea" offset="0.218" />
</lineargradientbrush>
</rectangle.fill>
</rectangle>
<textblock x:name="button2_text" text="button 2" />
</canvas>
you can use names once...
Archived Forums SA-SM > Silverlight (formerly WPF/E) Developer Issues
Comments
Post a Comment