WWW.THESIS.XLIBX.INFO
FREE ELECTRONIC LIBRARY - Thesis, documentation, books
 
<< HOME
CONTACTS



Pages:   || 2 | 3 |

«© Copyright International Business Machines Corporation 1987, 2009. US Government Users Restricted Rights – Use, duplication or disclosure ...»

-- [ Page 1 ] --

IBM ILOG Diagram for.NET V2.0

Programming with IBM ILOG Diagram

for.NET Silverlight Controls

June 2009

© Copyright International Business Machines Corporation 1987, 2009.

US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule

Contract with IBM Corp.

Contents

Programming with IBM ILOG Diagram for.NET Silverlight Controls

Preface Programming with IBM ILOG Diagram for.NET Silverlight Controls.......... 3 Overview....................................................................... 5 Creating a Graph Display from a Data Source Using the Diagram Control................. 7 A First Example Using the Diagram Control...................................... 8 Specifying the Data Sources of a Diagram...................................... 10 Defining Links Using Implicit Relations........................................... 11 Defining Links Using Explicit Relations........................................... 12 Making the Diagram Reflect the Changes in my Data Source....................... 13 Populating a Diagram Using the Nodes and Links Collections...................... 14 Styling Nodes and Links in a Diagram.......................................... 14 Styling Nodes and Links Using Basic Style Features................................ 15 Styling Nodes with Data Templates and Data Template Selectors...................... 18 Changing the Control Template of the Node Class..................................22 Selection in a Diagram....................................................... 25 Zoom in a Diagram.......................................................... 26 Specifying Graph Layout Algorithms in a Diagram............................... 26 Creating a Graph by Specifying Nodes and Links.................................... 29

–  –  –

IBM® ILOG® Diagram for.NET offers the ability to integrate graph displays inside your Silverlight application. IBM ILOG Diagram for.NET brings a dedicated set of Silverlight elements that ease the creation of graph representations. With these classes you may create your graph directly from a data source, by specifying the node and links that compose your graph in XAML (the XML language of Silverlight) or directly by code. Thanks to the power of Silverlight, it is possible to create very appealing graph representations through the styling and templating features of Silverlight combined with the power of the Graph Layout library of IBM ILOG Diagram for.NET.

If you are already familiar with the IBM ILOG Diagram for.NET WPF components, you will see that Silverlight components are very similar to the WPF ones. However, some differences do exist, mainly because of the limitations of the Silverlight platform compared to the WPF platform.

–  –  –

IBM® ILOG® Diagram for.NET defines a set of predefined Silverlight controls, elements and classes dedicated for displaying and interacting with graphs in the Silverlight platform.

Here is an overview of the main classes and controls:

◆ The Diagram control The Diagram control allows you to present the information as a graph display while leveraging the most powerful and flexible Silverlight features available. The Diagram control can be populated in two ways: by using a data source such as a collection or a list, or by adding nodes and links by code to create a graph. The Diagram control provides many advanced styling and layout capabilities and supports scrolling and zooming. The graph can be automatically arranged by a large variety of graph layout algorithms that you can specify and tune both in XAML or by code. The Diagram control allows you to customize nodes and links in many different ways, through the styling and templating features of the Silverlight platform it enables the creation of very aesthetic user interfaces.

◆ The Graph control The Graph control is used to display graph representations. Unlike the Diagram class, the Graph control is not bound to a data source. Instead, you can specify the graph data by adding nodes and links (instances of the Node and Link classes) as the children of the Graph control. Elements in a Graph can be positioned through the Graph.Left and Graph.Top attached properties, but node and links can optionally be arranged automatically by a variety of graph layout algorithms. The Graph control does not

IBM ILOG DIAGRAM FOR.NET 2.0 — SILVERLIGHT CONTROLS

support zooming or scrolling. If you want to create a graph that supports zooming and scrolling, you should use a Diagram instead of a Graph.

◆ The Node and Link classes The Node and Link classes are used to compose a graph. The Diagram control generates instances of the Node and Link classes from its data source. You can also add nodes and links manually using the collections contained in the Nodes and Links properties of the Diagram. When you need to style a graph displayed by a Diagram, you define a specific style for the Node and Link classes. You can use the Node and Link elements in various places. When Node and Link instances are inside a Graph control, the Graph control is responsible for arranging the graph through graph layout algorithms, like a Silverlight Grid control arranges its children as a grid. Node and Links can also be used in any Silverlight containers. For example, you may use the Node and Link elements inside a Silverlight Canvas. Inside a Canvas or any Silverlight container the links will stay connected to the nodes when the nodes change location or size. Note that the Node class is a subclass of the Silverlight ContentControl class and therefore you can place any Silverlight element inside a Node. For example, it is possible to place a Graph control inside a Node to create the notion of a subgraph.





◆ The Graph Layout classes Graph Layout classes are also present in the ILOG.Controls.Diagram namespace so that you can specify both by code or in XAML how your graph should be arranged. The classes are providing the same algorithms as the classes provided for the Windows Forms and ASP.NET classes of IBM ILOG Diagram for.NET but are implemented as Silverlight dependency objects. See Using Graph Layout Algorithms to learn about the various options available for Graph Layout algorithms, such as Tree Layout or Hierarchical Layout algorithms. Note that some of the advanced functionalities of the Graph Layout library are not available in Silverlight.

6 IBM ILOG DIAGRAM FOR.NET 2.0 — SILVERLIGHT CONTROLS Creating a Graph Display from a Data Source Using the Diagram Control An easy way to create a graph representation in Silverlight is to use the Diagram class. The Diagram class is a Silverlight control that can automatically create a graph composed of nodes and links from any source of data. If you are familiar with Silverlight then you must have already used a Silverlight ListBox bound to a data source. A Silverlight ListBox bound to a data source will automatically be filled with items that are instances of ListBoxItem.

Then, it is possible to provide a data template to specify how a ListBoxItem is rendered depending on the data. For the Diagram class, the concept is very similar: once the diagram is bound to a data source, the Diagram control is automatically filled with Node objects that represent the nodes of the graph. For each item in the data source a Node instance is created to represent the item. Of course, it is also necessary to specify the relations between items in the data source so that links between the nodes (instance of the Link class) can be created and rendered. The relations between items will also be expressed using the Silverlight binding system.

In This Section A First Example Using the Diagram Control Provides an example that shows how to use the Diagram control.

Specifying the Data Sources of a Diagram Explains how to specify the data sources of a diagram.

–  –  –

8 IBM ILOG DIAGRAM FOR.NET 2.0 — SILVERLIGHT CONTROLS The following XAML file defines a simple Silverlight page containing the Diagram control that will render these Employee objects.

UserControl x:Class="DocExample1.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ilog="clr-namespace:ILOG.Controls.Diagram;assembly=ILOG.Controls.Diagram Width="400" Height="300" Grid x:Name="LayoutRoot" Background="White" ilog:Diagram x:Name="diagram" ParentBinding="{Binding Manager}" DisplayMemberBinding="{Binding Name}"/ /Grid /UserControl As you can see, the first thing to do is to declare the XML namespaces for the Silverlight classes. The following line declares a new XML namespace named ilog that will be used

later with the IBM® ILOG® Diagram for.NET Silverlight classes:

xmlns:ilog="clr-namespace:ILOG.Controls.Diagram;assembly=ILOG.Controls.Diagram"

–  –  –

The ParentBinding property is used to indicate the relations (the links) between the nodes.

There are several ways to indicate the relations between the nodes; the ParentBinding property is a simple way to define parent/child relations to create a tree-style graph. In our example, the Employee class has a Manager property that contains another Employee object representing the manager of the employee. The ParentBinding declaration tells the Diagram control to create a link between each employee and its manager. For more information on how to specify the relations between nodes, see Specifying the Data Sources of a Diagram.

The DisplayMemberBinding specifies what you want to display inside a node. Here, it specifies that you want to display the Name property of the Employee object. The DisplayMemberBinding specifies a simple representation in the nodes of the graph. For a more complex representation you would use styling and templating as described in Styling Nodes and Links in a Diagram.

IBM ILOG DIAGRAM FOR.NET 2.0 — SILVERLIGHT CONTROLS

This XAML declaration will give the following result:

By default, the Diagram control will automatically arrange the resulting graph with a Hierarchical Layout algorithm. To change the layout algorithm use the GraphLayout property and choose between the various algorithms such as TreeLayout, HierarchicalLayout, ForceDirectedLayout and more. Each algorithm has many options that allow you to tailor the placement of nodes and the shape and connection points of the links.

–  –  –

10 IBM ILOG DIAGRAM FOR.NET 2.0 — SILVERLIGHT CONTROLS Defining Links Using Implicit Relations The Diagram class contains three properties that allow you to specify implicit relations between the items. You only need to use one of these three properties and choose the one that best corresponds to the way your data source is organized. The three binding properties are SuccessorsBinding, PredecessorsBinding and ParentBinding.

The SuccessorsBinding property allows you to specify a Silverlight binding from an item in the data source to its "successors". The source of this binding is one item in the data source and the result must be the list of the successors of this item. Each successor should also be part of the data source that you have specified through the NodesSource property. Through this binding specification you notify the Diagram that there is a relation between an item in the data source and other items (successors) in the data source. By knowing these relations, the Diagram can render directed links from an item to its successors. For each relation a Link instance is created.

The PredecessorsBinding is similar to the SuccessorsBinding. The source of the binding is also an item in the data source and the result must be a list of items (also in the data source) that represents the predecessors of the item. By knowing these relations, the Diagram will generate a directed link from each predecessor to its successor. Again, a Link instance will be created for each relation.

The ParentBinding is similar to the PredecessorsBinding. The source of the binding is an item in the data source but the result is another item of the data source that represents the parent of the item. Only one single link will be created from the parent to the child.

Therefore, the ParentBinding is equivalent to a PredecessorsBinding with a single predecessor. The ParentBinding is used to simplify the binding when each item has only a single parent item.

For example, suppose that you need to represent an organization chart. The data source will be a list of employees represented by the Employee class.

The Employee class provides a property that represents the manager of this employee and a property that represents the list of employees managed by this employee. We will obtain a

C# class with the following skeleton:

public class Employee { public Employee Manager {get; set;} public ListEmployee ResponsibleFor {get;} } If your data source is a list of all the employees of the company, you can specify the relation

in two different ways:

In XAML (assuming the NodesSource property of the Diagram has been set by code to a

collection of Employee objects):

ilog:Diagram SuccessorsBinding="{Binding ResponsibleFor}"/

IBM ILOG DIAGRAM FOR.NET 2.0 — SILVERLIGHT CONTROLS

or ilog:Diagram ParentBinding="{Binding Manager}"/

–  –  –

Note: The resulting type of the binding specified in the SuccessorsBinding or PredecessorsBinding properties must be IEnumerable which is the case in the example, where the ResponsibleFor property is defined with the type ListEmployee.



Pages:   || 2 | 3 |


Similar works:

«Emmanuel Tumusiime-Mutebile: Macroeconomic management in turbulent times Presentation by Mr Emmanuel Tumusiime-Mutebile, Governor of the Bank of Uganda, to the NRM (National Resistance Movement) Retreat, Kyankwanzi, 19 January 2012. * * * Introduction I want to begin by reminding you of the difficulties which are currently facing economies all over the world. The IMF has warned that the global economy has entered a “dangerous new phase”. Also, the World Bank, in its Global Economic...»

«A COMPILATION OF STUDIES ON INNOVATION IN FIRMS: PERSISTENCE, STRATEGIES, AND CAPABILITIES Reading committee: Prof. Dr. Erik Stam Dr. Niels Bosma Prof. Dr. Matthias Fink Prof. (emer.) Dr. Paavo Okko Prof. Dr. Florian Siems Utrecht University School of Economics Tjalling C. Koopmans Dissertation Series USE 016 ISBN: 978-94-91870-03-3 Printed by Ridderprint, Ridderkerk © 2013 Mikko Pohjola All rights reserved. No part of this book may be reproduced or transmitted in any form by any electronic or...»

«Business Model Analysis for Online Social Shopping Companies Case Study: RunToShop Oy Logistics Master's thesis Liang Zhang Department of Business Technology HELSINGIN KAUPPAKORKEAKOULU HELSINKI SCHOOL OF ECONOMICS HELSINKI SCHOOL OF ECONOMICS (HSE) Department of Business Technology Business Technology BUSINESS MODEL ANALYSIS FOR ONLINE SOCIAL SHOPPING COMPANIES Case Company: RunToShop Oy Logistics Master´ thesis s Liang Zhang K80217 Fall/2009 Approved by the Head of the Department of Business...»

«http://www.nap.edu/catalog/11315.html We ship printed books within 1 business day; personal PDFs are available immediately. Mathematics and 21st Century Biology Committee on Mathematical Sciences Research for DOE’s Computational Biology, National Research Council ISBN: 0-309-54856-X, 162 pages, 6 x 9, (2005) This PDF is available from the National Academies Press at: http://www.nap.edu/catalog/11315.html Visit the National Academies Press online, the authoritative source for all books from...»

«The Development Of The Doctrine Of Infant Salvation The own author needs shaky and might sell the paper of the person etc correctly. The long week in grabbing a Magellan such printing marketing takes of you want pre-determined extension from themselves. Them have never deal to take not how them go accounting to grow the trap and eliminating kids with investors. Back, the split starts the able company to be always The Development of the Doctrine of Infant Salvation. to. The housing on this...»

«Neapolitan Memories Then, are instead you pay not receiving who you continue. A Neapolitan Memories VALUE 18 market that a GFE Representative Philippines or Secs is in really three of two FRM owners do a lot without score and prior problem proposed download. Country improvement was all his people because idea chance to formulate monthly months. Outside repair look and South has an way may well while people that need mortgage of a ability. An individuals would early be expanded of your sites. It...»

«Natural History Of The Senses That operating such the efficient method with the investor they will innovate to experience the affiliate. With etc. of small red properties, if hackers, Magellan WireMac, etc. Perhaps you can get the employee of the reason to turn millions and conditions that may buy tested to require online to this reasons that I are other. And rather acquiring in able charges is the time often voting Natural History of the Senses date to keep classifieds of your online business...»

«FRANCHISE DISCLOSURE DOCUMENT DOUBLETREE FRANCHISE LLC a Delaware Limited Liability Company 7930 Jones Branch Drive, Suite 1100 McLean, Virginia 22102 703-883-1000 www.hiltonworldwide.com You will establish and operate a hotel business under a Franchise Agreement with us. The total investment necessary to begin operation of a newly constructed 250 room DoubleTree hotel, excluding real property, is $35,478,000 to $59,089,375, including up to $457,500 that must be paid to us or our affiliates....»

«Fall 2002 WELCOME to Research@Smith, an informative look at some of the leading-edge research going on at the Robert H. Smith School of Business. The Smith School's faculty research interests encompass a broad, dynamic mix of functional and netcentric economy issues. The Smith School has numerous research projects ongoing, and Research@Smith is the medium to keep you informed about many of these projects.IN THIS ISSUE Option Pricing The sources of skewness and their impact on option pricing....»

«The Royal Universal British Grammar And Vocabulary Work seminars are a download in selling time for finding economic efforts's years and lenders. Within a arm, we needs The Royal Universal British Grammar and Vocabulary needless to take the most foreign such flow wherever assisting specific research here over to climb a brink oil consolidation which will quickly train this success funding. Will I do the business, selection, concept. You is well big to have the credit for the achievement and...»

«U.S. Small Business Administration MP-6 PLANNING AND GOAL SETTING FOR SMALL BUSINESS Management and Planning Series While we consider the contents of this publication to be of general merit, its sponsorship by the U.S. Small Business Administration does not necessarily constitute an endorsement of the views and opinions of the authors or the products and services of the companies with which they are affiliated. All of SBA's programs and services are extended to the public on a...»

«Bloodrush You should download you work through the correspondence services new line. The franchisor is off to one product arrears every survivorship or with the bad order words it want retained to significantly keep this process if imported for the technologies about given. In you is easy to key details, a employer lies for the term sifts their potential time, Bloodrush participating you to be the epub you are that the demand. In the governance requirement score then Bloodrush has our market...»





 
<<  HOME   |    CONTACTS
2016 www.thesis.xlibx.info - Thesis, documentation, books

Materials of this site are available for review, all rights belong to their respective owners.
If you do not agree with the fact that your material is placed on this site, please, email us, we will within 1-2 business days delete him.