wpf - Using Generic Types in Window.Resources -


I'm trying to use generic type in Windows. Resources section in XAML code To attach the notification for the collection of objects, my general collection is given below as per the observation:

  Public Class Presentation Collection & lt; T & gt; : Observable collection & lt; T & gt; {Public Presentation Collection (list & amp; tt; t & gt; list): base (list) {}}  

is an extension method that gives an overview concept for the list That is shown below:

  Public Static Class Extension Rule (Public Static Presentation Model Collection & lt; T & gt; ToObservableCollection & lt; T & gt; (This list & lt; T & Gt; list) {Model Collection to return the new presentation & lt; T & gt; (list);}}  

Now, Resource is shown below:

  & lt; window; Resources & gt; & lt; LearningWPF: Presentation Collection Collection: Key = "Customer" & Lt; LearningWPF: Customer First Name = "Mohammed" Last Name = "Azam" />  

Of course, the above code does not work, there is no way to make any such customer collection to above, Implies the connection?

Mike Hilberg has something that can help with it and work very well Are there. I believe that you want to create a collection and collection type for each type that you want to wrap up. XAM also has a solution to use generics, but their website has exceeded its bandwidth limit for this time.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -