Hi Telerik Teams,
Please help me on one issue with loading values slider in Slider. When i load the slider with DoubleCollection I get an error .The project is done in Visual studio 2008. I lost lots of time for troubleshooting.But i cant solve this error. Please help me.
The error is "Specified element is already the logical child of another element. Disconnect it first. in using canvas".
I mention below the code that implemented in the project for loading the Slider.
----------------------------------------------------------------------------------------------------------------------------------------------
ParentCanvas = New Canvas()
ParentCanvas.ClipToBounds = True
ParentCanvas.Width = 1200
ParentCanvas.Height = 800
Dim ValText As String
Dim Valcode As Integer
Dim tickcollection As New DoubleCollection()
Dim canvas30 As New Canvas()
If canvas30 IsNot Nothing Then
canvas30.Children.Remove(RadSlider1)
End If
For i As Integer = 0 To alItemSource.Count
Dim pInfo As TWBS.UI.B1.DashBoards.PlotInfo = alItemSource(i)
ValText = pInfo.LegendLabel
Dim dictionary As New Dictionary(Of String, Integer)
dictionary.Add(ValText, i)
Valcode = dictionary.Item(ValText)
tickcollection.Add(Valcode)
RadSlider1.Ticks = tickcollection
RadSlider1.TickPlacement = Telerik.Windows.Controls.TickPlacement.BottomRight
canvas30.Children.Add(RadSlider1)
ParentCanvas.Children.Add(canvas30)
Next
The Bolded code is the place where i get the error.Its urgent.please help me.......