Hi,
I'm trying to use NestedProperties feature with CustomTypeDescriptor and custom PropertyDescriptor, but the autogenerated PropertyDefinition does not have NestedProperties and HasNestedProperties is false:
void AutoGeneratingPropertyDefinition(object sender, AutoGeneratingPropertyDefinitionEventArgs e) { var descriptor = e.PropertyDefinition.SourceProperty.Descriptor as PropertyDescriptor; if (descriptor != null) { //e.PropertyDefinition.NestedProperties.Count == 0 //but descriptor.GetChildProperties().Count > 0
//why? } }in my scenario:
What's the condtition I need to satisfy to autogenerate NestedProperties' PropertyDefinitions?
it is not so easy to create sample project to simulate my scenario but I can do that if you can't answer without it
Hi folks,
i tried to cancel the editation of a ComboBoxColumnCell. But when i set GridViewPreparingCellForEditEventArgs.Cancel to true, the cell gets in edit mode, too.
Is it a bug or do i have to set another property?
Thanks
David
I had a RadCartesianChart control with a LineSeries within, which amtrying to replace with an AreaSeries. And following is the new code I have:
<telerik:RadCartesianChart Name="outputChart" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <telerik:RadCartesianChart.Grid> <telerik:CartesianChartGrid MajorLinesVisibility="XY"> <telerik:CartesianChartGrid.MajorXLineStyle> <Style TargetType="Line"> <Setter Property="Shape.Stroke" Value="{StaticResource gridLineColor}" /> </Style> </telerik:CartesianChartGrid.MajorXLineStyle> <telerik:CartesianChartGrid.MajorYLineStyle> <Style TargetType="Line"> <Setter Property="Shape.Stroke" Value="{StaticResource gridLineColor}" /> </Style> </telerik:CartesianChartGrid.MajorYLineStyle> </telerik:CartesianChartGrid> </telerik:RadCartesianChart.Grid> <telerik:RadCartesianChart.HorizontalAxis> <telerik:DateTimeContinuousAxis Name="horizontalAxis" HorizontalAlignment="Center" HorizontalContentAlignment="Center" ElementBrush="LightGray" PlotMode="OnTicks" LabelInterval="2" LabelStyle="{StaticResource XAxisLabelStyle}" MajorStepUnit="Minute" FontSize="12" Foreground="{StaticResource textForeground}" LabelFormat="h:mm tt" LineThickness="0" Minimum="{Binding StartTime}" Maximum="{Binding EndTime}" MajorStep="{Binding HorizontalMajorStep}" /> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis Name="verticalAxis" Title="{x:Static resources:Strings.VerticalAxisTitle}" ElementBrush="LightGray" Minimum="0" Maximum="{Binding VerticalMax}" LineThickness="0" MajorStep="{Binding VerticalMajorStep}" /> </telerik:RadCartesianChart.VerticalAxis> <telerik:RadCartesianChart.Series> <telerik:AreaSeries Name="combinedSeries" ItemsSource="{Binding ChartPoints}" ValueBinding="Combined" CategoryBinding="CalculationTime" StrokeThickness="2" Stroke="{StaticResource StrokeColor}" ClipToPlotArea="False" Visibility="{Binding ThroughputVisibility}"> <telerik:AreaSeries.AreaShapeStyle> <Style TargetType="Path"> <Setter Property="Fill" Value="{StaticResource StrokeColor}" /> <Setter Property="Opacity" Value="0.2" /> </Style> </telerik:AreaSeries.AreaShapeStyle> </telerik:AreaSeries> </telerik:RadCartesianChart.Series> <telerik:RadCartesianChart.Annotations> <telerik:CartesianGridLineAnnotation Name="combinedWarningLevelAnnotation" Axis="{Binding ElementName=verticalAxis}" Value="{Binding CombinedThroughputWarningLevel}" Label="{Binding CombinedThroughputWarningLevel}" Foreground="{StaticResource textForeground}" FontSize="9" Visibility="{Binding CombinedThroughputVisibility}" StrokeThickness="1" Stroke="{StaticResource combinedThroughputColor}" /> </telerik:RadCartesianChart.Annotations> </telerik:RadCartesianChart> The vertical bound for the chart is dynamically bound to VerticalMax which is calculated at each time step after determining if any data value being plotted is above the current vertical limit. This logic was working perfectly well with LineSeries and the moment I replaced it with AreaSeries, the graph lines started going outside the vertical limits (i.e below 0 and above vertical max of the chart). There has been no change in the data being fed in whatsoever. Is there anything else I should be doing while using AreaSeries?

I've found the code to override the template selection:DataTemplateSelector
But the collapsed state of the combobox is not working.
Here is the XAML:<telerik:RadComboBox x:Name="cboPickups" Command="{Binding PickupChangedCommand}" HorizontalAlignment="Stretch" CommandParameter="{Binding ElementName=cboPickups,Path=SelectedItem}" IsEnabled="{Binding CanSelectPickup}" ItemsSource="{Binding Pickups}" SelectedValuePath="CustomerId" SelectedValue="{Binding Path=SelectedPickup.Id, Mode=OneWay}" Margin="4"> <telerik:RadComboBox.ItemTemplateSelector> <Helpers:CustomerComboTemplateSelector /> </telerik:RadComboBox.ItemTemplateSelector></telerik:RadComboBox><DataTemplate x:Key="CustomerComboCollapsed"> <TextBlock Text="{Binding CompanyName}" /></DataTemplate><DataTemplate x:Key="CustomerComboExpanded"> <StackPanel> <TextBlock Text="{Binding CompanyName}" /> <TextBlock Text="{Binding CityState}" /> </StackPanel></DataTemplate>public override System.Windows.DataTemplate SelectTemplate(object item, System.Windows.DependencyObject container){ var presenter = (ContentPresenter) container; if (presenter != null && item != null) { if (presenter.TemplatedParent is ComboBox) { return presenter.FindResource("CustomerComboCollapsed") as DataTemplate; } else { return presenter.FindResource("CustomerComboExpanded") as DataTemplate; } } return null;}But when the window initializes and it tries to load the ComboBox, the "container" is null.
So it's trying to assign the collapsed template, but for some reason the container is null. Any ideas? I've narrowed it down to the RadComboBox. If I replace it with the base ComboBox control it works fine.
I've attached the screen shots for the collapsed/expanded and the debugger.
Thanks,
-Sid.
Background:
Our applications have multiple maps. I tried using one map control and moving it around to whichever screen was active but that was impractical.
I also tried creating a shared list of providers amongst the map controls, but that just didn't work.
Problem:
Each map has to create its own Bing provider so each map is creating its own session. If I have 10 maps, then my application is using 10x the amount of billable transactions than it should be every time it's opened. Is it possible to "share" sessions? For example, the first provider to be created could get the session and then I could just set the other providers to use the same session ID manually?
I think I can test this but wanted to know if there any problems with doing this.
I'm currently in a heavy need of the GanttView control, but having some minor & major problems.
Major Problem
See Picture Bug_1 -> Bug_2
In Bug1 you see how the control initializes with the columns packed together very close and behind the GanttView. On Bug2 you see what happens, as soon as i use the horizontal scrollbar beneath the columns. Is there any real workaround for this behavior?
Minor Problem
See Picture Problem_Splitter and Spacing
1) The orange highlighted Splitter. How can I access this and set it to a specific size? (I need to adjust the splitter so, table view and chart view are both exactly 50% regardless of width of window)
2) The green highlighted Space. This is a space the control uses because of HorizontalAlignment="stretch" but not really. I want the GanttView to behave as every other control when on Stretch mode -> use the whole space available. Any solution/workaround for this?
tia
Mark
Hi,
I would like to know if there is a property to get the column filter back in text format.
for example if I set the filter to filter on city something like
Dim S =gridview.columns("city").GetFilterDescription
's contains " city = 'berlin' "
otherwise I have to create the text from scratch.....
I've just downloaded the UI for WPF Q2 2016. I'm trying to use the Search as you type feature, but it's throwing exceptions.
My XAML looks as follows:
<telerik:RadGridView ItemsSource="{Binding Table}" AutoGenerateColumns="True"></telerik:RadGridView>And my ViewModel:
public class TestViewModel : INotifyPropertyChanged{ private DataTable _table; public event PropertyChangedEventHandler PropertyChanged; public TestViewModel() { var table = new DataTable(); table.Columns.Add("StringValue", typeof(string)); for (int i = 0; i < 100; i++) { table.Rows.Add($"String Value {i}"); } Table = table; } public DataTable Table { get { return _table; } set { _table = value; OnPropertyChanged(nameof(Table)); OnPropertyChanged(nameof(View)); } } public DataView View { get { return Table.DefaultView; } } protected virtual void OnPropertyChanged(string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); }}
When thrying to search as you type I get an ArgumentException with message: "Column '[StringValue]' does not belong to table".
I've tried binding to the Table as well as the DefaultView of the table, but the results are the same.
I have a RadCartesianChart with one ScatterPointSeries when the number of points is 20000 the time to plot is 40 seconds.
The class where stored values:
public class ChartDataFlatness { public double XValue { get; set; } public double YValue { get; set; } public Brush Brush { get; set; }}The class used to pass value to RadCartesianChart
class ViewModelFlatness : ViewModelBase{ private List<ChartDataFlatness> data; public ViewModelFlatness() { } public List<ChartDataFlatness> Data { get { return this.data; } set { if (this.data != value) { this.data = value; this.OnPropertyChanged("Data"); } } }}The user control used for show the data:
<UserControl x:Class="TiQ.Qua.Tna.Quality.Station.UserControls.UserControlChartFlatnessQualityStation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:classes="clr-namespace:TiQ.Qua.Tna.Quality.Station.Classes" mc:Ignorable="d" RenderTransformOrigin="0,0" HorizontalAlignment="Left" VerticalAlignment="Top"> <Grid> <telerik:RadCartesianChart x:Name="RadChartFlatness" LayoutUpdated="RadChartFlatness_LayoutUpdated" > <telerik:ScatterPointSeries XValueBinding="XValue" YValueBinding="YValue" > <telerik:ScatterPointSeries.PointTemplate> <DataTemplate> <Rectangle Width="10" Height="10" Fill="{Binding DataItem.Brush}"/> </DataTemplate> </telerik:ScatterPointSeries.PointTemplate> </telerik:ScatterPointSeries> <telerik:RadCartesianChart.HorizontalAxis><telerik:LinearAxis VerticalLocation="Top" /></telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis><telerik:LinearAxis IsInverse="True" /></telerik:RadCartesianChart.VerticalAxis> </telerik:RadCartesianChart> </Grid></UserControl>The code used to set data for RadGraph:
ViewModelFlatness _viewModel = new ViewModelFlatness { };// Set Data of _viewModelRadChartFlatness.Series[0].ItemsSource = _viewModel.Data;It is possibile to reduce the time to plot data to 2/5 seconds.
Greetings,
Paolo​
The issues we can reproduce with the latest version 2016.2.822.40
Issues #1 and #2.
How to reproduce on the test project:
Run the application.
Click the «Create new QCV with group descriptor» button.
See pic. 1
We see two issues:
1. Groups inside the table are doubled. Group descriptors collection
contains two group descriptors (of the same type: GroupDescriptor), but only
one is shown in «Grouped by» section.
2. Grid itself does not notify when its GroupDescriptors collection has
been changed, though QueryableCollectionView bound to this Grid notifies of its
GroupDescriptors collection successfully.
Issue #3
How to reproduce on the test project:
Start the application.
Delete the «Profession» group descriptor (click on X in «Groupped by»).
Group by the «Profession» group manually (drag-and-drop column header onto «Grouped by»).
Click the «Create new QCV with group descriptor» button.
See pic. 2.
We see now, that group descriptors were
doubled. In the GroupDescriptors collection of Grid there are two descriptors
of two different types: ColumnGroupDescriptor and GroupDescriptor. And it seems
impossible to programmatically add a descriptor of type «ColumnGroupDescriptor»
in the viewmodel, because it should know about the UI (it needs column data),
and hence is against the principles of MVVM.
Furthermore, if you now click the «Create new QCV with group descriptor» button again, you will see that groups are tripled:
See pic. 3