Windows Phone and Silverlight ListBox.ItemTemplate

Posted by user551308 on Stack Overflow See other posts from Stack Overflow or by user551308
Published on 2011-01-04T21:50:47Z Indexed on 2011/01/04 21:54 UTC
Read the original article Hit count: 271

Hi, I have a Windows Phone 7 application with the following listbox and every item contains 2 textblocks and a HyperlinkButton.

   <ListBox.ItemTemplate>

In the ViewModel constructor I have the following code:

GetCommand = new RelayCommand(() =>{some code}); where GetCommand is a property :

public RelayCommand GetCommand { get; private set; }

My problem is that GetCommand = new RelayCommand(() =>{some code}); is not executing when I press the button.

I must say that if dont place the HyperlinkButton insise the itemTemplate, everything works fine. I use the Galasoft mvvm light tookit - http://www.galasoft.ch/mvvm/getstarted/ I appreciate any help.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about Silverlight