Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Binding XML with WPF

$
0
0

Hello,

I have a xml like this:

<Trans>
  <Languages>
    <LanguagesID>c9759ba9-a812-4f84-ae8c-1d95645d4a6d</LanguagesID>
    <ISO>ces</ISO>   
  </Languages>
  <Languages>
    <LanguagesID>7327c78a-3522-484f-8260-2c6d6567ce9e</LanguagesID>
    <ISO>eng</ISO>  
  </Languages>

<Translations>
    <TranslationsID>5dcd0ce5-05e7-4eac-b818-1e9ecae3cd58</TranslationsID>
    <LanguagesID>c9759ba9-a812-4f84-ae8c-1d95645d4a6d</LanguagesID>   
    <Translation>záměna verzí</Translation>
  </Translations>
  <Translations>
    <TranslationsID>c1bed4b4-c762-458a-95e0-1eaec26b0a52</TranslationsID>
    <LanguagesID>7327c78a-3522-484f-8260-2c6d6567ce9e</LanguagesID> 
    <Translation />
  </Translations>

  </Trans>

In wpf datagrid i want to have like this ( but from xml only,here is a linq2sql example; as datacontext is List<Translations>):

   <dg:DataGrid Name="dgrdDbItems" ItemsSource="{Binding}" ">
                <dg:DataGrid.Columns>
                    <dg:DataGridTextColumn Binding="{Binding Path=Language.ISO}" Header="Item" />           
                </dg:DataGrid.Columns>
            </dg:DataGrid>

Is XmlDataProvider or linq2 xml supporting this ?

I have an app to change so it would operate in db mode or standalone xml based.

What would be a smooth fastest solution here ...

will appreciate for fast response ...

Best





Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>