我想在选择网格视图项目时启用按钮,以便我将在 Metro 应用程序中更新我的 GUI。该按钮也包含在列表视图项中。下面是我想要做的代码片段。请帮忙。
<GridView Name="searchPanelGrid" SelectionMode="Single"
HorizontalAlignment="Left"
ScrollViewer.IsHorizontalScrollChainingEnabled="True"
ScrollViewer.IsVerticalScrollChainingEnabled ="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollMode="Enabled"
ScrollViewer.VerticalScrollMode="Enabled"
ItemsSource="{Binding Source={StaticResource CollectionItems}}" Grid.Row="2">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<WrapGrid Orientation="Horizontal" />
</ItemsPanelTemplate>
</GridView.ItemsPanel>
<GridView.ItemTemplate>
<DataTemplate>
<Grid Margin="6" Height="175" Width="150" Background="#FFFAFAFA">
<Grid.RowDefinitions>
<RowDefinition Height="85"/>
<RowDefinition Height="50"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<StackPanel Background="#FF0A56BF" Width="150" Height="85" Grid.Row="0">
<Image Source="{Binding Path=ThumnailUrl}" Stretch="UniformToFill" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</StackPanel>
<TextBlock Text="{Binding Path=VideoName}" TextWrapping="Wrap" Foreground="#FF017DD5" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Height="Auto" FontSize="12"/>
<Button x:Name="downloadButton" Grid.Row="3" Content="Download Video" HorizontalAlignment="Left" VerticalAlignment="Bottom" Style="{StaticResource DownloadButtonStyle}" Click="downloadButton_Click" IsEnabled="{Binding}" />
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
无法绑定按钮属性 IsEnabled。有什么建议我该怎么做?