When you start dragging from a connector, a Link object is immediately created and added to the diagram. I would argue that the link is added too early since it's not live until you release the mouse, but that aside! When you do release the mouse on another connector, we need to update our internal representation of the flow diagram. Hence, it makes sense to connect source and target since that is what happened. Now...
This function seems to be what we are looking for. However, target is always null (since the link is created too early :P).
public override ILink CreateLink(object source, object target)
At some point we need to know which two connectors were connected. Where do we find such an event/method override? Our best bet so far is overriding the ConnectionManipulationCompleted event, but it seems we cannot determine which two connectors were actually linked:
private void diagram_ConnectionManipulationCompleted(object sender, ManipulationRoutedEventArgs e)
{
if (e.ManipulationStatus == ManipulationStatus.Attaching)
{
var startShape = e.Connection.Source as MyShape;
var endShape = e.Connector.Shape as MyShape;
// WHICH connectors where connected?
...
}
}
If we drag from Node1.Left to Node2.Right we ought to get this piece of information. How? (Note that we have our custom connectors.
<
telerik:RadNumericUpDown
Value
=
"{Binding NumberProperty, Mode=TwoWay}"
/>
public
double
NumberProperty
{
get
{
return
_NumberProperty; }
set
{
if
(_NumberProperty != value)
{
_NumberProperty = value;
OnPropertyChanged();
}
}
}
private
double
_NumberProperty = 25.56365;
Hi,
I’m binding CategotiesSource to my Categories collection and TimeMarkersSource to my TimeMarkers collection.
While categories are displaying perfectly right in the Edit Dialog, TimeMarkers drop down displays only Brushes’ colors I have defined; no text appears next to them.
What can be wrong?
thank you