我试图为一个学校项目创建一个网上商店。问题是在底部附近我想将所选名称放入文本框中,但它似乎不起作用
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Default="clr-namespace" x:Class="Project.BrowseStore"
Title="Browse the store" Height="501.786" Width="735.714" WindowStartupLocation="CenterScreen">
<Grid>
<Label Content="" HorizontalAlignment="Left" Margin="107.94,65.044,0,0" VerticalAlignment="Top"/>
<ComboBox x:Name="CmbSort" HorizontalAlignment="Left" Margin="270.627,65.044,0,0" VerticalAlignment="Top" Width="120" IsReadOnly="True" ToolTip="Sorteren" Tag="Sorteren" Text="Sorteren">
<ComboBoxItem Content="Alle" Selected="ComboBoxItem_Selected_Alle"/>
<ComboBoxItem Content="Prijs groter dan" Selected="ComboBoxItem_Selected_Prijs"/>
<ComboBoxItem Content="Prijs kleiner dan" Selected="ComboBoxItem_Selected_Prijs"/>
<ComboBoxItem Content="Naam" Selected="ComboBoxItem_Selected_Naam"/>
<ComboBoxItem Content="Boeken" Selected="ComboBoxItem_Selected_Alle"/>
<ComboBoxItem Content="Games" Selected="ComboBoxItem_Selected_Alle"/>
<ComboBoxItem Content="Jaaruitgave" Selected="ComboBoxItem_Selected_Jaaruitgave"/>
</ComboBox>
<Label Content="Zoeken op" HorizontalAlignment="Left" Margin="122.94,65.044,0,0" VerticalAlignment="Top" Width="82.77" Height="25.96"/>
<TextBox x:Name="TxtSort" IsEnabled="False" HorizontalAlignment="Left" Height="23" Margin="427.344,65.044,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" RenderTransformOrigin="-0.062,0.519"/>
<Button x:Name="BtnGo" Content="Go" HorizontalAlignment="Left" Margin="581.075,67.044,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/>
<TextBox x:Name="txtTest" HorizontalAlignment="Left" Height="23" Margin="143.761,117.284,0,0" TextWrapping="Wrap" Text="
" VerticalAlignment="Top" Width="120"/>
<Button Content="Order" HorizontalAlignment="Left" Margin="130.71,442.226,0,0" VerticalAlignment="Top" Width="75"/>
<DockPanel x:Name="Panel" Height="282.226" LastChildFill="False" Margin="23.493,155,0,0" VerticalAlignment="Top" Width="683.881">
<ListView x:Name="lstSort" HorizontalAlignment="Left" Height="138.209" VerticalAlignment="Top" Width="683.881" DockPanel.Dock="Top" IsSynchronizedWithCurrentItem="True">
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn Header="Type" DisplayMemberBinding="{Binding Type}"/>
<GridViewColumn Header="Naam" DisplayMemberBinding="{Binding Naam}"/>
<GridViewColumn Header="Prijs" DisplayMemberBinding="{Binding Prijs}"/>
<GridViewColumn Header="Jaaruitgave" DisplayMemberBinding="{Binding Jaaruitgave}"/>
<GridViewColumn Header="Afbeelding" DisplayMemberBinding="{Binding Afbeelding}"/>
<GridViewColumn Header="Uitgever" DisplayMemberBinding="{Binding Uitgever}"/>
<GridViewColumn Header="Stock" DisplayMemberBinding="{Binding Stock}"/>
</GridView>
</ListView.View>
</ListView>
<TextBox Height="144.017" TextWrapping="Wrap" Text="{Binding Naam}" VerticalAlignment="Top" Width="120"/>
</DockPanel>
</Grid>
这部分似乎不起作用......
<TextBox Height="144.017" TextWrapping="Wrap" Text="{Binding Naam}" VerticalAlignment="Top" Width="120"/>
任何帮助,将不胜感激。