By default item templates are rendered below item text. You can control the rendering location by placing the template inside a DIV tag and tweaking its CSS.
<ItemTemplate>
<div style="margin-top:-28px;float:right;">
<input type="button" value="Expand/Collapse" ID="Button1" />
</div>
</ItemTemplate>
In this example the template is moved by 28 pixels by settings its top margin (the panel item height is 28 pixels).