いずれかを選択したListBoxときにListBoxItems、「表示」ボタンの表示を変更して表示したいのですが。デフォルトの状態が非表示であることを意味します。
これは可能ですか?可能であれば、XAMLまたはコードビハインドのトリガーでこれを解決しますか?
XAMLピース
<ListBox Background="Transparent"
ItemContainerStyle="{StaticResource listBoxTemplate}" BorderThickness="0">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" VerticalAlignment="Center" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Background="Beige" Margin="10 10 10 10"
HorizontalAlignment="Center" Width="500" Height="100"
VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Name="TopRow" Height="50" />
<RowDefinition Name="BottomRow" Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Name="LeftSideMenu" Width="*"/>
<ColumnDefinition Name="Middle" Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="{Binding name}" />
<Button Grid.Column="1" VerticalAlignment="Center"
Grid.RowSpan="2" Name="view" Click="viewClicked_Click"
Grid.Row="0">View</Button>
<Label Grid.Column="0" Grid.Row="1"
Content="{Binding description}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>