background preloader

Simplifying the WPF TreeView by Using the ViewModel Pattern

Simplifying the WPF TreeView by Using the ViewModel Pattern
Download the source code (requires Visual Studio 2008) - 28.6 KB Introduction This article explores how to use the ViewModel pattern to make it easier to work with the TreeView control in WPF. Along the way, we examine why people often have difficulty with the WPF TreeView, what a ViewModel is, and two demo applications that show how to combine a TreeView with a ViewModel. One of the demos shows how to create a searchable TreeView, the other demonstrates how to implement lazy-loading (a.k.a. load-on-demand). Background of TreeView The TreeView control in WPF has gained an undeserved bad reputation. In Window Forms, it is very easy to use the TreeView control because it is dead simple. In contrast, the WPF TreeView is extremely flexible, inherently supports UI virtualization (i.e., TreeViewItems are created on-demand), allows for full visual customization, and has full support for data binding. Background of ViewModel This makes it easier to create a user interface (UI) for the application.

virtual.olympus.blog | Silverlight TreeView - Drag & Drop with MVVM Introduction The Silverlight 4 TreeView control, when leveraged with the HierarchicalDataTemplate, allows easy binding of hierarchical data. The Silverlight Toolkit's TreeViewDragDropTarget wrapper control provides Drag & Drop support to the TreeView. Mixing the three together, you get pretty good out-of-the-box support for Drag & Drop reorganization of hierarchical data. However, when searching online, I was unable to find an example of integrating this functionality with the MVVM pattern. In my previous article, I talked about enabling Drag & Drop reordering of a ListBox control. Background To setup the scenario, we have a basic Category maintenance application. The application will be backed by a WCF RIA Services backend, but I won’t spend much time on the details of the backend. The Data Model The data model, as mentioned, is extremely simple. The View We’ll start by setting up our view and getting the basic UI layout in place based on the layout above. The ViewModel Conclusion

Advanced TreeView for .NET Download source code - 74.2 Kb Introduction Working on several different projects, I was needed to display and edit hierarchical data. Of course, the first thing you will do is to use the standard .NET TreeView control. It works pretty well if you only need basic features. But learning this control to do something more complex is not an easy job. The architecture of this control comes mainly from the Java Swing component, with some modifications. Model-View architecture - Will be covered in a separate section of this article. The following screenshots illustrate the TreeViewAdv features: Model-View Architecture I really like the Model-View pattern, and decided to use it in this control. It’s very simple, and you need to implement only two methods. To specify the exact node in the model, TreePath class is used. public class TreePath { public object[] FullPath{ get; } public object LastNode{ get; } public object FirstNode{ get; } } Using TreeView Customizing TreeView NodeControls

Configure BIND DNS on Windows Web Server 2008 – Part 2 November 10, 2008By Dave Lawlor In the first part of this series on Installing BIND DNS I walked you through installing the software on Windows Web Server 2008. The main reason for this of course, is that Windows Web Server 2008 does not allow you to install the Microsoft DNS Role. In this part of the series I will walk you through an initial configuration of the BIND DNS server. First let’s talk about a few different types of DNS server setups available. Authoritative Name Servers Every DNS zone, like www.trainsignaltraining.com, is served by at least one authoritative name server which contains all the DNS records for the zone. To account for fault tolerance most zones have more than one server that keeps all these records in case of outages. Caching Name Servers Also called a recursive name server, this is most commonly the local DNS server that your operating system talks to. Creating an Authoritative Name Server with BIND 1. 2. Close the command prompt 3. run zones log 4. 5. 6. 7. 8. 9. 1.

Hierarchical Treeview with ASP.NET MVC & jQuery - Mike Bosch's Blog on .NET First of all, an apology for being so quiet over the past few weeks. I've been putting my blogging aside for a while to chase some pet projects I'm working on. More on that later. I did, however, run into a particular situation that I thought would be of interest to anyone adopting ASP.NET MVC and looking for some goodies from jQuery. In this post, I'm going to cover a simple way to build a deep, hierarchical and feature-rich tree structure with only one line of jQuery script. jQuery has a huge library of plugins covering all sorts of functionality. This structure will consist of a category/sub-category relationship that is able to support n-levels of sub-categories with no changes. Notice the rows with ParentCategoryID set to NULL are the parent categories. The jQuery Treeview plug-in requires the resulting HTML to be in a particular unordered list (<ul>) element to parse the tree correctly. In the controller, we are simply passing in the categories where the ParentCategoryID == null.

Configure profile synchronization using a Lightweight Directory Interchange Format (LDIF) file (SharePoint Server 2010) Published: September 16, 2010 An LDIF file is an ASCII file that can be used to exchange information with LDAP Directory System Agents (DSAs). You can also use an LDIF file to synchronize profile information with SharePoint Server 2010. To do this, you must create an LDIF file by using your LDAP provider and save it to the %rootdir%\Program Files\Microsoft Office Servers\14.0\Synchronization Service\Ma-data\ directory on the server running SharePoint Server. The LDIF file must be saved to the LDIF <MA_Name> folder within this directory and must contain the profile information that you want to synchronize with SharePoint Server 2010. Once you have created an LDIF file that conforms to the schema shown in the sample LDIF file and created an LDIF MA, you can customize the default profile property schema by adding properties not included in the default schema. Before you perform this procedure, confirm the following: To create an LDIF MA by using the Synchronization Service Manager

CRM 2011 TreeView for Dependent Picklist Synchronizing SharePoint profiles data from LDS - Sameer Surve I need to syn between sharepoint 2010 and ad LDS. I've followed this article - technet.microsoft.com/.../ff959234.aspx. What I did is I create customProperty_LoginID in sharepoint Manager User Profile. 1) SPS-ClaimProviderType to "Trusted". 2) SPS-ClaimProviderID to the name which is being used in the <membership> in the web.config file 3) for mapping, in LDIF MA, I mapped the customProperty_LoginID to customProperty_LoginID as import. Then I run synchronization profile from Central Admin but I cannot see the users get imported in the sharepoint. Thanks. Programming Without Coding Technology Free Science & Engineering software downloads

Related: