Click here to Skip to main content
15,906,947 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Tarun.K.S14-Apr-11 21:16
Tarun.K.S14-Apr-11 21:16 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Pete O'Hanlon14-Apr-11 22:47
mvePete O'Hanlon14-Apr-11 22:47 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Tarun.K.S14-Apr-11 23:47
Tarun.K.S14-Apr-11 23:47 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Pete O'Hanlon15-Apr-11 0:03
mvePete O'Hanlon15-Apr-11 0:03 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Tarun.K.S15-Apr-11 0:17
Tarun.K.S15-Apr-11 0:17 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
SledgeHammer0115-Apr-11 4:36
SledgeHammer0115-Apr-11 4:36 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Tarun.K.S15-Apr-11 7:25
Tarun.K.S15-Apr-11 7:25 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
SledgeHammer0115-Apr-11 7:50
SledgeHammer0115-Apr-11 7:50 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Tarun.K.S16-Apr-11 8:41
Tarun.K.S16-Apr-11 8:41 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
devvvy14-Apr-11 23:10
devvvy14-Apr-11 23:10 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
Tarun.K.S15-Apr-11 0:00
Tarun.K.S15-Apr-11 0:00 
AnswerRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
SledgeHammer0114-Apr-11 6:26
SledgeHammer0114-Apr-11 6:26 
GeneralRe: WPF virtualizingstackpanel vs Grid or StackPanel Pin
devvvy14-Apr-11 23:04
devvvy14-Apr-11 23:04 
QuestionHow to add the data from text box to already created list data item source Pin
Rocky2313-Apr-11 4:09
Rocky2313-Apr-11 4:09 
AnswerRe: How to add the data from text box to already created list data item source [modified] Pin
Tarun.K.S13-Apr-11 4:57
Tarun.K.S13-Apr-11 4:57 
GeneralRe: How to add the data from text box to already created list data item source Pin
Rocky2313-Apr-11 5:32
Rocky2313-Apr-11 5:32 
GeneralRe: How to add the data from text box to already created list data item source Pin
Pete O'Hanlon13-Apr-11 6:26
mvePete O'Hanlon13-Apr-11 6:26 
GeneralRe: How to add the data from text box to already created list data item source Pin
Rocky2313-Apr-11 19:12
Rocky2313-Apr-11 19:12 
GeneralRe: How to add the data from text box to already created list data item source Pin
Pete O'Hanlon13-Apr-11 21:57
mvePete O'Hanlon13-Apr-11 21:57 
GeneralRe: How to add the data from text box to already created list data item source Pin
Tarun.K.S13-Apr-11 7:46
Tarun.K.S13-Apr-11 7:46 
QuestionSorting a listbox when SortDescription won't cut it [modified] Pin
Jean-Louis Leroy12-Apr-11 23:29
Jean-Louis Leroy12-Apr-11 23:29 
AnswerRe: Sorting a listbox when SortDescription won't cut it Pin
SledgeHammer0113-Apr-11 13:34
SledgeHammer0113-Apr-11 13:34 
GeneralRe: Sorting a listbox when SortDescription won't cut it Pin
Jean-Louis Leroy13-Apr-11 21:06
Jean-Louis Leroy13-Apr-11 21:06 
Relevant lines from Window_Loaded:
dataset = new DNLMHDataSet(); // a designer-generated typed dataset
reportingUserAdapter = new ReportingUserTableAdapter();
reportingUserAdapter.Fill(dataset.ReportingUser);
listBoxSelectedReporting.DataContext = dataset;

I run my program and make it break. In the Immediate window:
?System.Windows.Data.CollectionViewSource.GetDefaultView(listBoxSelectedReporting.DataContext)
{System.Windows.Data.BindingListCollectionView}
    [System.Windows.Data.BindingListCollectionView]: {System.Windows.Data.BindingListCollectionView}
    CanFilter: false
    CanGroup: true
    CanSort: false
    Culture: null
    CurrentItem: {System.Data.DataViewManagerListItemTypeDescriptor}
    CurrentPosition: 0
    Filter: null
    GroupDescriptions: {System.Collections.ObjectModel.ObservableCollection<System.ComponentModel.GroupDescription>}
    Groups: null
    IsCurrentAfterLast: false
    IsCurrentBeforeFirst: false
    IsEmpty: false
    SortDescriptions: {System.ComponentModel.SortDescriptionCollection.EmptySortDescriptionCollection}
    SourceCollection: {System.Data.DataViewManager}

Let's try the cast:
?(ListCollectionView)System.Windows.Data.CollectionViewSource.GetDefaultView(listBoxSelectedReporting.DataContext)
Cannot cast 'System.Windows.Data.CollectionViewSource.GetDefaultView(listBoxSelectedReporting.DataContext)' (which has an actual type of 'System.Windows.Data.BindingListCollectionView') to 'System.Windows.Data.ListCollectionView'

When I look at the MS headers I see that both ListCollectionView and BindingListCollectionView derive from CollectionView. They're siblings, hence no cast...
GeneralRe: Sorting a listbox when SortDescription won't cut it Pin
SledgeHammer0114-Apr-11 5:13
SledgeHammer0114-Apr-11 5:13 
GeneralRe: Sorting a listbox when SortDescription won't cut it Pin
Jean-Louis Leroy15-Apr-11 1:11
Jean-Louis Leroy15-Apr-11 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.