A Hookup represents the connection between the domain (a property of an object) and a section of a view (one or more boxes or strings). Typically it knows how to connect to an event (and disconnect when disposed) that is raised when a particular property changes, how to get the value, and how to inform the view of the change. Some subtypes may (eventually) know how to perform the reverse operation, that is, when something in the view is edited, the Hookup knows what should be changed in the domain model.
Inheritance: IHookup, IHookupInternal, IDisposable, IReceivePropChanged
Exemplo n.º 1
0
 /// <summary>
 /// Return the one of your direct children which is or is a parent of the given child hookup
 /// (or null if no such exists).
 /// </summary>
 internal Hookup ChildContaining(Hookup child)
 {
     if (child.ParentHookup == this)
     {
         return(child);
     }
     return((from hookup in child.Parents where hookup.ParentHookup == this select hookup).FirstOrDefault());
 }
Exemplo n.º 2
0
		/// <summary>
		/// Return the one of your direct children which is or is a parent of the given child hookup
		/// (or null if no such exists).
		/// </summary>
		internal Hookup ChildContaining(Hookup child)
		{
			if (child.ParentHookup == this)
				return child;
			return (from hookup in child.Parents where hookup.ParentHookup == this select hookup).FirstOrDefault();
		}
Exemplo n.º 3
0
		/// <summary>
		/// An entry point for making a selection, setting the current position to the specified hookup.
		/// </summary>
		public static SelectionBuilder In(Hookup startHookup)
		{
			return new SelectionBuilder() {AnchorHookup = startHookup};
		}