How to Inspect a Binding made with 2015⌶ ?

Using Microsoft Windows Presentation Foundation and Syncfusion WPF Libraries

How to Inspect a Binding made with 2015⌶ ?

Postby PGilbert on Sun Aug 31, 2014 1:54 pm

If I do the following:

Code: Select all
 names←'Paul' 'Pierre' 'John' 'Alain' 'Michel'
 ⎕EX'ns'
 ns←⎕NS¨(⍴names)⍴⊂''
 ns.Names←names

 ⎕USING←'System.Windows,WPF/PresentationFramework.dll'
 win←⎕NEW Window

 win.DataContext←2015⌶'ns'

 dc←win.DataContext


I have now a collection with the property 'Names' bound to the DataContext of a Window. The question is: How to inspect that collection in APL and particularly how to read back the 'Names' from that collection using the variable 'dc' that is a Dyalog.Data.DataBoundCollectionHandler ?

Thanks in advance,
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to Inspect a Binding made with 2015⌶ ?

Postby DanB|Dyalog on Sun Aug 31, 2014 7:57 pm

Is this what you mean?

Code: Select all
      ⌷dc
 Dyalog.Data.DataBoundNamespace  Dyalog.Data.DataBoundNamespace  ...
      1⌷⌷dc
Dyalog.Data.DataBoundNamespace
      (1⌷⌷dc).⎕nl-2
 ref
      (1⌷⌷dc).ref
#.[Namespace]
      (1⌷⌷dc).ref.⎕nl-2
 Names
DanB|Dyalog
 

Re: How to Inspect a Binding made with 2015⌶ ?

Postby PGilbert on Sun Aug 31, 2014 11:37 pm

Thanks Daniel you have answered my question. The code I was looking for was:

Code: Select all
     (⌷dc).ref.Names
 Paul  Pierre  John  Alain  Michel


Thanks again.
User avatar
PGilbert
 
Posts: 362
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada


Return to WPF & Syncfusion

Who is online

Users browsing this forum: No registered users and 1 guest