KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need some quick help which is a road blocker for me now. I have Button in ItemsControl and I need to perform some task on Button click. I tried adding Command to Button in I temsControl DataTemplate but its not working. Can anyone suggest how to proceed further. <UserControl.Resources> <DataTemplate x:key="mytask"> <TextBox Grid.Row="5" Grid.Column="2" Text="{Binding Path=PriorNote}" Grid.ColumnSpan="7" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,5" Width="505" Foreground="Black"/> <StatusBarItem Grid.Row="2" Grid.Column="8" Margin="8,7,7,8" Grid.RowSpan="2"> <Button x:Name="DetailsButton" Command="{Binding CommandDetailsButtonClick}"> </DataTemplate> </UserControl.Resources> <Grid> <ItemsControl Grid.Row="1" ItemsSource="{Binding ListStpRules}" ItemTemplate="{StaticResource myTaskTemplate}" Background="Black" AlternationCount="2" > </ItemsControl> </Grid> and in ViewModel I have implemented code for Command. And its not working. Please suggest any solution for me to proceed further
Tags (comma-separated)
Save Edits
Cancel