Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Handling selected item in ListBox Region

$
0
0
Hi Brian,

Thanks for the suggestion. Currently I think using RequestNavigate also this problem will arise. But I would have to try.

Currently I have implemented one workaround.
The ChildView is implementing IActiveAware and IPartImportsSatisfiedNotification. IsActive Property is bound to IsSelectedItem of Listbox Region
<Style x:Key="RegionListItemContainerStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="IsSelected" Value="{Binding IsActive, Mode=TwoWay, NotifyOnSourceUpdated=True}"/>
On ImportSatisfy event in the child view, I am setting IsActive to true, which will update the ListboxItem IsSelected property and hence on UI we see that item is selected.

Regards,
Sharda.

Viewing all articles
Browse latest Browse all 1878

Trending Articles



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