selecteditem

Unable to select multiple rows in a WPF DataGrid

核能气质少年 提交于 2021-02-11 06:42:11
问题 Even though I've got SelectionMode="Extended" and SelectionUnit="FullRow" set, when I debug the SelectionChanged event, there's always only one selected item in SelectedItems . This is my DataGrid : <DataGrid Grid.Row="0" AutoGenerateColumns="False" Margin="5,5,5,0" Name="dgrMembersClub1" ItemsSource="{Binding .}" CanUserAddRows="False" SelectionMode="Extended" SelectionUnit="FullRow" SelectionChanged="Grid_SelectionChanged"> <DataGrid.Columns> <DataGridTemplateColumn Header="Joining" >

UWP ListView bind SelectedItem to property in viewmodel

自闭症网瘾萝莉.ら 提交于 2021-01-28 08:32:49
问题 I'm trying to bind SelectedItem in a ListView to the property SelectedSection in the viewmodel. I'm getting the following error: "Invalid binding path 'ViewModel.SelectedSection' : Cannot bind type 'Model.Section' to 'System.Object' without a converter". I'm currently binding the ListView's ItemSource to a list in the CurrentProject property. I tried making a converter, but I'm not quite sure how and what I'm suppose to convert. I got the same error when I tried to just get the property I

Trying to override textbox for combobox styling (System.windows.markup.staticresourceholder exception)

和自甴很熟 提交于 2020-03-05 04:36:09
问题 I'm new in WPF and acccording to my previous question How to make selecteditem text red and bold on trigger (in combobox) I still have a problem with making my selecteditem (but not all combobox items) text red and bold in case when its IsNotCorrect property is true. If be more concrete I have system.windows.markup.staticresourceholder exception (it seems that all converters are declared, not sure of my new style declaring and the right order for it). These are the steps I have made: create