I want to remove one item from a ListView with GridView. After i removed the item from the GridView and reloading the GUI it still there.
<ListView Name="ListView_Panel" Margin="5,0,5,0" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Visible">
<ListView.View>
<GridView>
<GridViewColumn Width="Auto" Header="Path ID" DisplayMemberBinding="{Binding pathid}"/>
<GridViewColumn Width="Auto" Header="file date" DisplayMemberBinding="{Binding filedate}"/>
<GridViewColumn Width="Auto" Header="device" DisplayMemberBinding="{Binding device}"/>
<GridViewColumn Width="Auto" Header="mean frequenzy [Hz]" DisplayMemberBinding="{Binding meanfreq}"/>
<GridViewColumn Width="Auto" Header="data length" DisplayMemberBinding="{Binding datalength}"/>
</GridView>
</ListView.View>
<ListView.ContextMenu>
<ContextMenu>
<MenuItem Header="Open NetCDF" Name="menuOption1"/>
<MenuItem Header="Set Zoom" Name="menuOption2"/>
<Separator/>
<MenuItem Header="Exit" Name="menuExit"/>
</ContextMenu>
</ListView.ContextMenu>
</ListView>
This is my XML Part and here is how iam loading it:
$reader = (New-Object System.Xml.XmlNodeReader $xaml)
$sync.Window = [Windows.Markup.XamlReader]::Load( $reader )
#Importieren der Objekte
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {
try {
Write-Output "Adding $($_.Name)"
$sync.Add($_.Name, $sync.Window.FindName($_.Name))
}
catch {
throw
}
}
I want to remove the path id from the GridView. I tried to delete the GridViewColumn line and reloaded the gui but its still there and i dont understand why. I tried restarting my vscode my pc cause i was thinking there is a cache or something but i cant figure it out. Renaming the Listview worked but that isnt a thing for me.
Maybe someone knows.
3