• 0

Silverlight Create UI objects from XML


Question

Working with Silverlight for the first time and getting some ideas for a project I'm working on.  Basically, trying to create a clickable UI formed from an XML file.

 

I've attached a picture so you have an idea of what I'm trying to do.

 

Done some research, and got some ideas of using linq to xml and what not.  The hardest part will of course be making clickable objects from the C# objects.  Looking at ways of using the canvas to accomplish this.

 

Any ideas?  Thanks!

post-196550-0-88984300-1375204553.jpg

1 answer to this question

Recommended Posts

  • 0

I'd look at the MSDN articles about XAML data binding. They're pretty good at explaining how it works and how to connect your data sources to the UI.

http://msdn.microsoft.com/en-us/library/aa480224.aspx

 

You could, for example, load your XML using an XmlReader into an ObservableCollection that's connected to a ListView, thus automatically creating controls in the view when the data changes.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Cortana's real value was that early on it let you connect assistants like Alexa to it so you could use Cortana while at your PC to control other assistants. That was what MS envisioned for it, a sort of assistant hub that let you manage the others. Then Amazon killed the ability in Alexa which ended that. MS just never brought out any new ideas to make up for it. It was then just "yet another" assistant, which who is going to use an assistant while at their PC then Alexa in the kitchen then also Google Nest when in another room?
    • Swallowed Pride? Try more "they got tired of making YT work, just for Google to break the site on purpose again to SPECIFICALLY not work in Edge."
    • You joke, but BSOD is an important feature of Windows, one that Linux doesn't exactly have, which can lead to some wasted time troubleshooting issues. What I mean by that is that when Linux does a kernel panic, it is far from guaranteed that the normal kernel panic text actually gets shown on the screen, depending on what mode you are in. Sometimes a kernel panic will just result in your desktop manager seeming to go unresponsive, which may lead you down the wrong troubleshooting path.
    • Great write up. Microsoft had much from developers when it comes to new features and frameworks. That fortune seems only Apple appears to have. The day they announce new visuals or API’s, almost all developers jump immediately on implementing it when the first beta is out, so it can be released asap. And when a developer is slacking, Apple users actively call them out.
    • Tiles on 10 was great for touch devices, just few people use WIndwos devices in an actual Tablet way. Groove as GREAT it seamlessly pulled my music to stream from my OneDrive even on the mobile app. Legacy Edge was also great it was only failed because Google kept screwing with their sites to break them for non-Chromium browsers. Cortana also had great possibilities and was just never fully realized. Kind of like Siri. IMO they should have just revamped it to be what Copilot is.
  • Recent Achievements

    • Week One Done
      SmileWorks Dental earned a badge
      Week One Done
    • Community Regular
      vZeroG went up a rank
      Community Regular
    • Collaborator
      Snake Doc earned a badge
      Collaborator
    • Week One Done
      Snake Doc earned a badge
      Week One Done
    • One Month Later
      Johnny Mrkvička earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      589
    2. 2
      Michael Scrip
      197
    3. 3
      ATLien_0
      195
    4. 4
      +FloatingFatMan
      131
    5. 5
      Xenon
      122
  • Tell a friend

    Love Neowin? Tell a friend!