I want to set backgound of selected row in RadTreeListView. I tried below, but it does not work.
I'm applying a theme to my application using no-xaml. When using a theme, is it not possible to change the background?
<Style TargetType="telerik:TreeListViewRow" BasedOn="{StaticResource TreeListViewRowStyle}">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="SelectedBackground" Value="#FFFFBB00" />
<Setter Property="Background" Value="#FFFFBB00"/>
</Trigger>
</Style.Triggers>
</Style>Is there a control in WPF that I can use for numeric input that looks just like a textbox, but doesn't allow anything non-numeric? I've looked at "Masked Input", and don't like the look nor the behavior (e.g. I don't like to see the template, and putting the curser at the beginning of field and hitting a number puts the number in the first digit and fills the rest with zeroes - nothing like a TextBox). I've also looked at the "Numeric UpDown", but haven't found a simple example that looks like a TextBox - all the examples show with the up and down arrows, which I don't want. I'm sure it's just a matter of formatting/templating/whatever, but I'm not a UI guy - I just want to drop the control on my form and maybe tweak a few parameters.
I would just use a TextBox bound to an integer, but the problem with that is if the user enters something non-numeric, a conversion exception is thrown, rather than a validation error. At that point the form validates just fine because the backing field hasn't actually changed yet, so the user can, for example, hit [Save] while there are errors shown on the screen, and the [Save] logic thinks all is well.
Any ideas?
Thanks!
Brad.
I want to expand a newly added item in RadTreeView so that the selection is visible. However, as the item is (obviously) not yet visible, the SelectedContainer is (and stays) null. As I am using HierarchicalDataTemplates to create the tree, I don't have the path of the newly created item - so I cannot use 'ExpandItemByPath' (or how can I get the Path for the selected item?).
So how can I find the parents of the recently created Item so that I could expand them?

I am using a RadCartesianChart with a ChartSeriesProvider to have multiple ScatterLineSeries plotted. I am controlling the X and Y min and max values displayed programmatically.
I am using a timer so I can change the X axis at some frequency I can set. I am testing it, but I intend to update the X min and max more than once a second so the chart shows a live previous 10 seconds. You can see points when they are created, then move through time until they go off the chart once it's more than 10 seconds old.
I am running into two problems.
I have 4 series. Each one is having points added about once a second. I run until I eventually get
'Collection was modified; enumeration operation may not execute.'
The call stack shows
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at Telerik.Charting.DataPointCollection`1.<System.Collections.Generic.IEnumerable<Telerik.Charting.DataPoint>.GetEnumerator>d__5.MoveNext()
at Telerik.Charting.NumericalAxisModel.PlotNormal(IEnumerable`1 series)
at Telerik.Charting.NumericalAxisModel.PlotCore(AxisUpdateContext context)
at Telerik.Charting.ChartAreaModelWithAxes.PlotAxisAndCombinedStrategy(AxisModel axis, AxisUpdateContext context)
at Telerik.Charting.ChartAreaModelWithAxes.PlotAxesAndCombinedStrategies(SeriesByAxesTuple seriesByAxes)
at Telerik.Charting.ChartAreaModelWithAxes.ArrangeOverride(RadRect rect)
at Telerik.Charting.ChartNode.Arrange(RadRect rect, Boolean shouldRoundLayout)
at Telerik.Charting.ChartAreaModel.Arrange()
at Telerik.Windows.Controls.ChartView.RadChartBase.CallUpdateUI()
at Telerik.Windows.Controls.ChartView.RadChartBase.OnInvalidated()
...
I think the chart is enumerating through the collection to see if it needs to update the axes every time a point is added. I am setting both axes myself as I have said so I'd think it wouldn't have to do that. If my assumption is correct, is there a way to turn this off? Otherwise should I look at locking the collection, or creating a buffer and adding chunks of data at a time? It does happen when there is just one series, and all 4 series.
Sorry to put two questions in here, but they may be related. I am wondering how much I am overloading the chart. Maybe it's not intended to have the axis updated super frequently so it's view/window moves through time.
The other problem relates to the band annotations I am using. They actually don't change, at least not when the chart is moving through time. I am setting vertical bands. The Y axis range only changes when values come in that are too high. But when that happens, the bands still stay the same. Both upper and lower bands' To and From don't change when the chart is moving through time.
''-1' is not a valid value for 'Width'.'
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) in System.Windows\DependencyObject.cs:line 812
The chart bands shouldn't ever have -1 being set as their width. When this exception happens, none of my code is changing the bands. The properties the bands' To and From are bound to aren't changing. I haven't seen this happen when I just comment out the bands in xaml.
Thanks!
Brad.
I'm using a DefaultVisualStyle Property to set the style in order to control the Fill color of ScatterPointSeries via the DataItem.PointColor property (as seen below)
This works fine, but when I try to use a ChartDataSourceStyle to reduce the number of datapoints using Index-based sampling, something breaks and I no longer see ANY points displayed in the graph, due to this binding failure:
Path Tag.DataItem.PointColor Path.Fill Brush PointColor property not found on object of type DataPointSamplingInfo.
** How can I redirect the DataPointSamplingInfo points to use the PointColor of its DataItems (they'll all have the same value) **
<Style x:Key="ScatterPointStyle" TargetType="Path" >
<Setter Property="Fill" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Tag.DataItem.PointColor}"/>
</Style>
<telerik:ChartSeriesProvider Source="{Binding ChartData}" >
<telerik:ChartSeriesProvider.SeriesDescriptors >