Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum

CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • Csla.NameValueListBase<K,V> for Windows Forms or safe for WPF

    rated by 0 users
    Answered (Not Verified) This post has 0 verified answers | 4 Replies | 1 Follower

    Top 25 Contributor
    204 Posts
    Jaans posted on Sat, May 31 2014 3:38 AM


    Context: Given that BusinessBindingListBase<T,C> is for supporting Windows Forms under CSLA 4, and BusinessListBase<T,C> is the Xaml (ObservableCollection) equivalent, then what about NameValueListBase<K,V> ?

    It is derived from the Csla.Core.ExtendedBindingListBase<T> type, so it would seem to be intended for supporting Windows Forms?

    If that is indeed correct what is the WPF/XAML/ObservableCollection equivalent, or is it safe for usage with the XAML binding?


    All Replies

    Top 10 Contributor
    4,106 Posts
    Andy replied on Sat, May 31 2014 11:33 AM

    Since the NVLB is a special kind of read only list and not editable, I believe it should be fine for use with Xaml, much like there is not a separate base for ROL to use between WinForms and Xml.

    Top 25 Contributor
    204 Posts
    Jaans replied on Sun, Jun 1 2014 9:26 AM

    Hi Andy

    Actually there is a different base class for Read Only Lists for use in WinForms vs. Xaml.

    WinForms should use : Csla.ReadOnlyBindingListBase<T,C>
    Xaml (or more accurately ObserverableCollection consumers) should use: Csla.ReadOnlyListBase<T, C>

    It because of this that I'm questioning NameValueListBase - it seems to have been missed in the base class split..

    Disclaimer: Unless I've got it all very wrong that is.

    Top 10 Contributor
    4,106 Posts
    Andy replied on Sun, Jun 1 2014 7:24 PM

    Hmm, so there is a ROBLB.  I wouldn't have thought so, since the list and items in the list don't change so whether or not the list is the WPF one or BL I wouldn't expect to matter.  That said, have you tried it?  I image if a separate one were needed, it'd have been created by now.  that or maybe NVL doesn't get much use. :)

    Top 10 Contributor
    2,279 Posts
    Suggested by Andy

    There is other reasons for that too.

    SortedBindingList and FilteredBindingList should work as expected for both editable and readonly lists in WinForms.

    At least for WPF there is some support for BindingList lists but sorting only works with ObservableCollection. 

    NameValueListBase is intended for readonly data the should not need sorting/filtering and thus there is no need to have different versions/base classes. 

    Jonny Bekkum, Norway CslaContrib Coordinator

    Page 1 of 1 (5 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems