Click here to Skip to main content
15,888,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a basic WPF ListView as:
<UserControl.Resources>
    <DataTemplate x:Key="batchItem">
        <vw:BatchDetail />
    </DataTemplate>
</UserControl.Resources>
<Grid>
    <Grid.Resources>
        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"  Color="LightSteelBlue"/>
        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
    </Grid.Resources>
    <ListView
            HorizontalAlignment="Center"
            BorderThickness="0"
            ItemsSource="{Binding Path=ExistingBatches}"
            ItemTemplate="{DynamicResource batchItem}"
            SelectedItem="{Binding Path=SelectedBatch}">

    </ListView>
</Grid>


On my dev PC (Running Windows 7) clicking anywhere in the ItemTemplate sets the SelectedItem.

On some of the production PC's - some are Windows 7 some are terminal servers, clicking within item template does set the selected item. It looks like the mouse click is not escalated.

Anyone seen this before, got any suggestions to fix it? Is this a bug with the .NET Framework?!?
Posted
Comments
azweepay 11-Jul-14 2:42am    
Is the item selected or not in the production environment?
Can you show the xaml for the BatchDetail (user)control?
Subramanyam Shankar 7-Mar-15 12:32pm    
Are you using relay command for command binding?

1 solution

If you are using relay command replace it with PRISM's delegate command . The relay command has some issue. This I have faced it . Once you change it to PRISM's delegate command the issue will be resolved.
 
Share this 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