Results 1 to 6 of 6

Thread: Silverlight Treeview examples in VB

  1. #1
    Join Date
    Apr 2010
    Posts
    88

    Silverlight Treeview examples in VB

    While developing an ASP.NET application, when designing the user interface, we find ourselves in a scenario where I need the navigation to certain pages is centralized in a single point of application. I am having really problem with it. Also I want some help about the Silverlight Treeview examples in VB. Please provide some information about the same. It would be really appreciable if someone provides me the sample of code.

  2. #2
    Join Date
    Mar 2008
    Posts
    232

    Re: Silverlight Treeview examples in VB

    While developing an ASP.NET application, when designing the user interface, we find ourselves in a scenario where I need the navigation to certain pages is centralized in a single point of application.
    We were also doing the same thing. In situations like this, to use a master page is an excellent solution, since we avoid duplicating the code in all pages that need to dispose of that browsing functionality. Additionally, we must include in that master page controls or controls that perform the navigation operation. The control will use this time for the sample to develop will be the TreeView Silverlight 2.

  3. #3
    Join Date
    Mar 2008
    Posts
    258

    Re: Silverlight Treeview examples in VB

    After the installer work in Visual Studio 2008 will, within the toolbox, the new controls that are part of the Toolkit (TreeView including, of course). You will have to develop a Web application that is composed of several WebForm, which will use a master page, which will host a Silverlight TreeView control. The TreeView contains a set of options (elements TreeViewItem) that when clicked will be redirected to the page.Therefore, started developing our example, start Visual Studio 2008 and creating a new Web project with the name NavMasterPageTreeView, which will add a MasterPage with the name Maestra.Master. Then add the Silverlight project to the solution, but for now you will have to focus on Web forms.

  4. #4
    Join Date
    Oct 2008
    Posts
    167

    Re: Silverlight Treeview examples in VB

    After creating the master page, you will have to add the project different Web forms we use to make navigation operations. Since its content does not represent an important aspect of such development, will consist simply of a Label control as a page title and TextBox, which in the Load event, we assign as the time value has occurred page load, that we will demonstrate later, a curious effect that occurs when you load the WebForm from the TreeView. The next point to develop is to add the TreeView control to the application and provide it with necessary functionality. This will add to the solution we are working on a new Silverlight project type under the name Options.

  5. #5
    Join Date
    Dec 2008
    Posts
    202

    Re: Silverlight Treeview examples in VB

    The following code example shows a simple TreeView control. To use the XAML, you need to change the ownership Source of objects Image to an absolute or relative URL of an image on your computer. The following code is in XAML :

    Code:
     <StackPanel x: Name = "LayoutRoot" Background = "White">
         <Border BorderBrush = "Black" BorderThickness = "2">
             <StackPanel>
                 <TextBlock Text = "TreeView Example" />
                 <Sdk: TreeView>
                     <Sdk: TreeViewItem Header = "Other items containing TreeViewItem.">
                         <Sdk: TreeViewItem.Items>
                             <Sdk: TreeViewItem>
                                 <Sdk: TreeViewItem.Header>
                                     <StackPanel Orientation = "Horizontal">
                                         <Image Height = "15" Width = "15" Source = "Resources / leave-site.jpg" />
                                         <TextBlock Text = "Item 1" Margin = "2" />
                                     </ StackPanel>
                                 </ Sdk: TreeViewItem.Header>
                             </ Sdk: TreeViewItem>
                             <Sdk: TreeViewItem>
                                 <Sdk: TreeViewItem.Header>
                                     <StackPanel Orientation = "Horizontal">
                                         <Image Height = "15" Width = "15" Source = "Resources / switch.jpg" />
                                         <TextBlock Text = "Item 2" Margin = "2" />
                                     </ StackPanel>
                                 </ Sdk: TreeViewItem.Header>
                             </ Sdk: TreeViewItem>
                         </ Sdk: TreeViewItem.Items>
                     </ Sdk: TreeViewItem>
                 </ Sdk: TreeView>
             </ StackPanel>
         </ Border>
     </ StackPanel>

  6. #6
    Join Date
    Dec 2008
    Posts
    161

    Re: Silverlight Treeview examples in VB

    Seen in the XAML code editor, design a page that contains a TreeView control with several TreeViewItem elements arranged in two levels, enabling us to arrange for a hypothetical types of functionality, the pages of our application. However, we would see at any time the entire tree of options, so that in the TreeViewItem top level, set the IsExpanded property to True. Clicking TreeViewItem each lower level, the result we aim to do is load in the browser corresponding WebForm, therefore, as the next step, that provides this interface design just the necessary functionality. Opening the code editor behind the XAML page, write an event handler for the Selected TreeViewItem objects. Since the operation to perform is the same in all cases, and only change the page to which we must sail, but would require a single event handler, and we will take the value of the Header property of TreeViewItem that receives the event the sender parameter, concatenate that value chain. "aspx", and will make navigation through the Navigate method of the object HtmlPage.Window. Within the constructor of the Silverlight page, we will make the association between objects TreeViewItem event and the manipulator.

Similar Threads

  1. Treeview in VBA in Excel
    By The-Farmer in forum MS Office Support
    Replies: 1
    Last Post: 28-01-2012, 03:48 PM
  2. Examples of C++
    By Winnebago in forum Software Development
    Replies: 4
    Last Post: 29-12-2010, 08:18 AM
  3. Business application examples for silverlight
    By Devabrata in forum Windows Software
    Replies: 5
    Last Post: 06-08-2010, 04:59 AM
  4. Features of Flexible TreeView
    By michaels in forum Windows Software
    Replies: 5
    Last Post: 22-01-2010, 05:32 AM
  5. Treeview with wpf module as child
    By Wyvern in forum Software Development
    Replies: 5
    Last Post: 11-12-2009, 05:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,668,058.23224 seconds with 17 queries