We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dynamically adding new circular pointers on the fly

Thread ID:

Created:

Updated:

Platform:

Replies:

93094 Feb 23,2010 02:17 AM Feb 24,2010 04:11 AM WPF 1
loading
Tags: Gauge
Administrator [Syncfusion]
Asked On February 23, 2010 02:17 AM

How would one dynamically add new circular pointers?

I've noticed that the pointers property is not a dependency property thus I'm unable to bind it.

I tried:
public void RefreshPointers()
{
//clear existing pointers
gaugeScale.Pointers.Clear();
CircularPointer newPointer;
int counter = 0;

foreach (NodeFaceItem item in
NodeContext.ActiveNodeFace.NodeFaceItems)
{
newPointer = new CircularPointer();
newPointer.BorderWidth = 0.3;
newPointer.PointerLength = 66;
newPointer.EnablePointerInteraction = false;
newPointer.PointerWidth = 5;
Binding valueBinding = new Binding("SafeValue");
valueBinding.Source = item;

newPointer.SetBinding(
CircularPointer.ValueProperty,
valueBinding);
newPointer.Value = item.SafeValue;
newPointer.PointerNeedleType =
PointerNeedleType.Marker;
newPointer.PointerPlacement =
ScalePlacement.Inside;
newPointer.BackgroundBrush =
_itemBrushes[counter % _itemBrushes.Length];
newPointer.Visibility = Visibility.Visible;
newPointer.Name = "p" + counter.ToString();
gaugeScale.Pointers.Add(newPointer);
counter++;
}
//gaugeScale.InvalidateVisual();
}

I even tried InvalidateVisual, but sometimes that throws an exception from the Refresh angle method that is hidden from me.

Ganesh Kanna S [Syncfusion]
Replied On February 24, 2010 04:11 AM

Hi HeetendraGowin,

Thanks for your interest in Syncfusion products.

We are able to reproduce the issue mentioned by you. While adding the pointers dynamically ,its added in the collection whereas visual is not updated. We have logged a defect issue for the same and it will be fixed in a week’s time. We will update you with custom assemblies once the issue is fixed.
Please let us know if you have any queries.

Thanks,
Ganesh Kanna S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;