- 0
[VB.NET & WPF& XML] Treeview only showing one XML node
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By MS Bob 11 · Posted
Windows is a scam for many decades, it's good if some people are realizing it now -
By Usama Jawad96 · Posted
Latest Patch Tuesday has broken DHCP Server in all Windows Server editions by Usama Jawad Microsoft released Patch Tuesday updates for Windows and Windows Server releases roughly a week ago, on June 10. In the latter, the release contained new functions for Narrator scan mode, along with tons of fixes for File Explorer, GDI+, Hyper-V, and more. At that time, Microsoft noted a known issue for Noto fonts, where Chinese, Japanese, and Korean text appears blurry or unclear under certain conditions. Now, it has highlighted another known issue following user reports. For the past couple of days, users on Reddit have been reporting issues with the DHCP service after applying the latest Patch Tuesday update. Apparently, rebooting the system fixes the issue, which can be understandably annoying. Now, Microsoft has updated the documentation for the June 10 release notes across Windows Server 2016, 2019, 2022, and 2025, to mention that the DHCP Server service may "intermittently" stop working after installing Patch Tuesday's update, which will impact IP renewal processes on client machines. Redmond has assured customers that it is working on a fix, which will likely be rolled out within the next few days. Of course, this problem is rather frustrating for IT admins, and that annoyance is reflected in the Reddit thread where customers are blaming Microsoft's software quality assurance practices. The fact that it's currently unclear when a fix will be rolled out may further add to customer grievances. For those unaware, the DHCP Server service in Windows is responsible for network management such as allocation and configuration of IP addresses in a centralized environment with robust logging and monitoring mechanisms. And for those keeping track, this is not the only Windows Server issue that has cropped up in recent memory. Last month, Microsoft pushed an out-of-band (OOB) hotfix to patch a Hyper-V bug that was plaguing the platform. Of course, one can argue that problems like these are happening because of incomplete testing, but it is also important to remember that Windows is running on hundreds of millions of devices all over the globe, so comprehensive test case coverage is very difficult, if not impossible. -
By JeanoLeBlanco · Posted
And still, no Windows Hello support for protected "tabs" in the "old"/Win32 OneNote app, a feature that was available for a long time in the UWP version. Please, Microsoft, get back to feature parity... -
By JeanoLeBlanco · Posted
Like jupe, for me, the most exciting news from Windows for a few weeks ( / months ?) now is the return of the clock in the taskbar calendar. I filed a feedback hub post so long ago about this. Finally! -
-
-
Recent Achievements
-
patrickft456 earned a badge
Week One Done
-
patrickft456 earned a badge
One Month Later
-
Jdoe25 earned a badge
One Month Later
-
Legend20 went up a rank
Explorer
-
jezzzy earned a badge
One Month Later
-
-
Popular Contributors
-
Tell a friend
Question
SirEvan
I'm trying to write a new application in VB.net and WPF for our internal support team to use in troubleshooting common customer issues. It's basically a treeview on the left side of the screen, with a document viewer on the right. The Goal is to have it so when someone clicks a topic on the left, it loads an XPS document into the viewer on the right.
Originally, I was going to hardcode values into the program for topics to be covered, but that would mean I'd have to recompile the code every time I wanted to add new topics, or someone submitted something to add. I decided to try looking at XML as a solution, so that the TreeView values could be pulled from a file, making everything external to the application.
I've got it semi working...except for one major problem...the treeview only seems to populate the very first node in the XML, not all of them. Here is what I've got so far.
TreeItems.xml XML file:
Section of WPF Xaml code that sets the xml file as the data provider:
<Window.Resources> <XmlDataProvider x:Key="TreeItems" XPath="Items/Item" Source="C:\TreeItems.xml"/> </Window.Resources>
and section of code that sets the treeview's datasource:
As it sits right now, the only thing that shows in the treeview box is "Sr-650-101" which is the first "Item" in my XML file. What am I doing wrong that prevents it from populating both (and ultimately other) xml items? The XML file was a sample I got somewhere, I replaced the Item names with 2 items I wanted to add, will need to change the City items to the sub-topics and XPS locations I want to use later, but for now I'd like to get the items to all load.
Thanks in advance.
Link to comment
https://www.neowin.net/forum/topic/867560-vbnet-wpf-xml-treeview-only-showing-one-xml-node/Share on other sites
0 answers to this question
Recommended Posts