Quantcast
Viewing all articles
Browse latest Browse all 1760

Created Unassigned: Hyperlinkbutton convention not working inside a ListBox [305]

Hi,

I'm trying to make the most of conventions in WP8. Specifically I wanted to use that of Hyperlinkbutton. It perfectly works when I use it inside a container like a Grid:

```
<Grid x:Name="LayoutRoot">
<HyperlinkButton x:Name="DoAction" Content="Action">
</Grid>
```
However, if I do the same inside a DataTemplate of a Listbox, it ignores the convention and the method of the ViewModel is not raised:

```
<ListBox x:Name="Books">
<ListBox.ItemTemplate>
<DataTemplate>
<HyperlinkButton x:Name="DoAction" Content="Action">
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
```

Then, I have to attach manually an action if i want the binding to work: cal:Message.Attach="DoAction".

Do you know what's going on?

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>