c# - ListBox.ItemTemplate with a custom control template inside DataTemplate -


I am developing a Windows Phone application I have defined the DataTemplate of a ListBox.ItemTemplate:

< Pre> & lt; ListBox margin = "10,10,8,8" x: name = "ChoicesList" & gt; & Lt; ListBox.ItemsPanel & gt; & Lt; ItemsPanelTemplate & gt; & Lt; Stackpane / & gt; & Lt; / ItemsPanelTemplate & gt; & Lt; /ListBox.ItemsPanel> & Lt; ListBox.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; Grid X: name = "listboxyl layout" background = "transparent" margin = "10" & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column define width = "0.281 *" /> & Lt; Column width = "0.71 9 *" /> & Lt; /Grid.ColumnDefinitions> & Lt; Image Source = "{Binding ImagePath}" height = "100" /> & Lt; StackPanel margin = "5,0,0,0" grid. Column = "1" & gt; & Lt; TextBlock x: name = "name" texterprekking = "wrap" text = "{binding name}" style = "{static resource phonetext3 style}" /> & Lt; TextBlock x: name = "description" margin = "0,5,0,0" textwapping = "wrap" text = "{binding description}" D: layout override = "width" style = "{StaticResource PhoneTextSmallStyle}" /> ; & Lt; TextBlock x: name = "rating" textwapping = "wrap" text = "{binding rating}" /> & Lt; / StackPanel & gt; & Lt; / Grid & gt; & Lt; / DataTemplate & gt; & Lt; /ListBox.ItemTemplate> & Lt; / ListBox & gt;

I want to convert all content inside ListBoxItem as a list because I want to add it to click event.

How can I do this?

Thank you.

You can use the "make in control" option in the mix.

You should consider using the "select changelog" event on the listbox, instead of one click (null) on the control.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -