How to Inspect a Binding made with 2015⌶ ?

Using Microsoft Windows Presentation Foundation and Syncfusion WPF Libraries
Post Reply
User avatar
PGilbert
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

How to Inspect a Binding made with 2015⌶ ?

Post by PGilbert »

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,
DanB|Dyalog

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

Post by DanB|Dyalog »

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
User avatar
PGilbert
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

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

Post by PGilbert »

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.
Post Reply