Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,I have a button inside my itemcontrol but my button is not firing and even i doesn't show the hand cursor when I focus on it can u please tell me what is wrong with my code?


XML
<ItemsControl.ItemTemplate>
       <DataTemplate>
          <Button
           Background="Aqua"
           Click="OnItemClick"
           Cursor="Hand"
           Focusable="False"
           >
          <Image  Source="{Binding photoname}" />
        </Button>
       </DataTemplate>
     </ItemsControl.ItemTemplate>
Posted
Updated 21-Oct-10 18:53pm
v2

1 solution

because ItemControl represents a control that can be used to present a collection of items.

and button does not contains Item Collection

you can use controls like Listbox, Combobox and so on
 
Share this answer
 
Comments
BaharDev 22-Oct-10 5:49am    
thank you for your answer:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900