Telerik Forums
UI for WPF Forum
1 answer
208 views

How can I get the source and target of a connection in runtime?
I tried this event from RadDiagram ConnectionManipulationCompleted, but it gives me the target is null, while I'm sure I linked it to the second shape.
If there is a way to get all connections for for each RaddiagramShape it would be much better than hitting an event inside the RadDiagram.
Please, reply me as fast as possible.

Thank you. 
Milena
Telerik team
 answered on 12 Feb 2015
3 answers
185 views
hello,

I need to dynamically mark on a map a few locations in the described way:
1. each location should be marked by a circle 
2. the center of the circle should be the location (latitude and longtitude)
3. and the radius of the circle needs to be 4KM (4000 meters) 

so when the user changes zoom level
the center of the circle should stay on the same exact location
and the radius should change according to the zoom level to reflect a 4KM at all times

i would also like the circles to be drawn dynamically, via code (not static file)  
and also fade out after, lets say, 15 seconds

is that possible?
should i use mapshape? or hotspots?
should i use information layer or dynamic layer
i am very confused with all the options
can you please make an example like that?

i need to know if radmap supports such a scenario
and can manage that

thank you very much
i realy hope this can be done..

Pavel R. Pavlov
Telerik team
 answered on 12 Feb 2015
1 answer
223 views
Dear Telerik,

I have a Master-Details window where the Master list is a ListView, and the SelectedItem of this ListView binded to a "SelectedObject" property in my ViewModel. 

The Details view should be a RadPropertyGrid, so the RadPropertyGrid's DataItem binded to this "SelectedObject" property as well.
This works fine, however it's very slow to change the selected Item. After I logged the runtime binding errors and warnings, I found that there are lots of "Cannot retrieve value using the binding and no valid fallback value exists; using default instead. BindingExpression:Path=FieldIndicatorVisibility" warnings in the logs.

It seems that the DataItem is null for some reason, however the PropertyGrid shows the properties perfectly. I'm not sure, maybe the PropertyGrid tries to get the "SelectedObject" when it's null, but it is never null, I tried many things to fix the issue, but still nothing. The SelectedObject is not a big ViewModel and the ViewModel implmenets the INotifyPropertyChange.

Let me show you high scope exampe:

View:

<!--The master list in the View (The Objects property is an ObservableCollection<MyObject>, the SelectedObject is a MyObject, both implement INotifyPropertyChanged)-->
<ListView ItemsSource="{Binding Objects}" SelectedItem="{Binding SelectedObject, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ... />

<!-- The details PropertyGrid. The Item binded to the same SelectedObject property. The SelectedObject is never null, but the DataItem is null sometimes -->
<telerik:RadPropertyGrid Item="{Binding SelectedObject, UpdateSourceTrigger=PropertyChanged}" AutoGeneratePropertyDefinitions="False">
      <telerik:RadPropertyGrid.PropertyDefinitions>

            <!-- Most of the properties have custom EditorTemplate, mostly NumericUpDown controls but not all of them, but it does not related to my problem -->
            <telerik:PropertyDefinition Binding="{BindingMyProperty1}" DisplayName="..." Description="... >
                  <telerik:PropertyDefinition.EditorTemplate>
                        <DataTemplate DataType="view:MyObject">
                              <telerik:RadNumericUpDown Value="{Binding MyProperty1, Mode=TwoWay}" />
                        </DataTemplate>
                  </telerik:PropertyDefinition.EditorTemplate>
            </telerik:PropertyDefinition>

            <!-- Another property ans so on... There are 20 properties in the PropertyDefinitions -->
            <telerik:PropertyDefinition Binding="{BindingMyProperty2}" DisplayName="..." Description="... >
                  <telerik:PropertyDefinition.EditorTemplate>
                        <DataTemplate DataType="view:MyObject">
                              <telerik:RadNumericUpDown Value="{Binding MyProperty2, Mode=TwoWay}" />
                        </DataTemplate>
                  </telerik:PropertyDefinition.EditorTemplate>
            </telerik:PropertyDefinition>

      </telerik:RadPropertyGrid.PropertyDefinitions>
</telerik:RadPropertyGrid>


ViewModel:

public class ExampleViewModel : BaseViewModelWithNotifyPropertyChanged
{

      // The the SelectedItem of the List and Item of the PropertyGrid. Never null
      private MyObject _selectedObject;
      public MyObject SelectedObject
      {
            get { return_selectedObject; }
            set { SetProperty(ref_selectedObject, value); }
      }

      // The ItemsSource of the ListView. Always fileld with not null MyObjects
      private ObservableCollection<MyObject> _objects;
      public ObservableCollection<MyObject> Objects
      {
            get { return _objects; }
            set { SetProperty(ref _objects, value); }
      }

}

With this settings, I've got many-many errors. Most of the errors refers the FieldIndicatorVisibility property, not sure why:

- System.Windows.Data Information: 10 : Cannot retrieve value using the binding and no valid fallback value exists; using default instead. BindingExpression:Path=FieldIndicatorVisibility; DataItem=null; target element is 'Grid' (Name=''); target property is 'Visibility' (type 'Visibility')

The common problem is that the DataItem=null. As far as I can see, the DataItem should be a MyObject instace (the same as the SelectedObject property in the ViewModel). Also interesting that the view is working, so its like the PropertyGrid didn't find the DataItem and retry to get the DataItem, and at least the ProeprtyGrid founds the DataItem. It's slow.

It is mission critical to resolve this issue, would you please help me?

Thanks in advance,
Daniel
























Boris
Telerik team
 answered on 11 Feb 2015
1 answer
147 views
Hello,
Currently, the following languages are supported for the built-in localization mechanism in WPF:
English, German, Spanish, French, Italian, Dutch, Turkish

Are there any plans to support additional languages?

Regards,
Martin
Dimitrina
Telerik team
 answered on 11 Feb 2015
1 answer
183 views
Hi all,

Im using a RadGridView to display Data at 3 levels like so:

                <telerik:RadGridView>
                    <telerik:RadGridView.ChildTableDefinitions>
                        <telerik:GridViewTableDefinition />
                    </telerik:RadGridView.ChildTableDefinitions>
                    <telerik:RadGridView.HierarchyChildTemplate>
                        <DataTemplate>
                            <telerik:RadGridView>
                                <telerik:RadGridView.ChildTableDefinitions>
                                    <telerik:GridViewTableDefinition />
                                </telerik:RadGridView.ChildTableDefinitions>
                                  <telerik:RadGridView.HierarchyChildTemplate>
                                    <DataTemplate>
                                        <telerik:RadGridView>


What I need to do now, in code, is the following. I know a value for all of the 3 depth levels, which means expand at level 1, expand at level 2, select and scroll intoView on level 3. Unfortunately I don't know how to get the child grids in code, so that all I've achieved so far is scroll and expand at level 1.

TIA
Boris
Telerik team
 answered on 11 Feb 2015
2 answers
115 views
When using series.RenderOptions = new BitmapRenderOptions(); the drawn series line will ignore the StrokeThickness property and always use 1px thickness. I'm using StepLineSeries series. 



How can I set the thickness of my StepLineSeries objects when using bitmap rendering?
Martin Ivanov
Telerik team
 answered on 11 Feb 2015
1 answer
98 views
Hi There

I'm calling WPF RadMap usercontrol inside Window form usercontrol using elementHost. But while calling using UI Virtualization it gives error as shown below.The below code work fine in standalone WPF usercontrol.



Later I found that this is threading issue related to STA architecture, as it also throw the error "The calling thread must be STA,because many UI components require this". See the attachment.

Cheers.
 
Petar Mladenov
Telerik team
 answered on 11 Feb 2015
1 answer
130 views
Hi There

I'm calling WPF RadMap usercontrol inside Window form usercontrol using elementHost. But while calling using UI Virtualization it gives error as shown below.The below code works fine in standalone WPF usercontrol.

MapShapeDataVirtualizationSource map = new MapShapeDataVirtualizationSource();
               AsyncShapeFileReader reader = new AsyncShapeFileReader();
               reader.ToolTipFormat = "FieldName";
               reader.Source = new Uri(rShape["path"].ToString() + ".shp", UriKind.RelativeOrAbsolute);
               reader.DataSource = new Uri(rShape["path"].ToString() + ".dbf", UriKind.RelativeOrAbsolute);
               map.Reader = reader;
               map.ReadAsync(); // Give the error .See the attached Error screen shot.
               map.ClearCache = false;
               vLayer.VirtualizationSource = map;
               vLayer.UseBitmapCache = false;
               vLayer.RefreshVirtualSource();
               this.radMapNaveo.Items.Add(vLayer);

The below code works.
AsyncShapeFileReader reader = new AsyncShapeFileReader();
               reader.ToolTipFormat = "FieldName";
               reader.Source = new Uri(rShape["path"].ToString() + ".shp", UriKind.RelativeOrAbsolute);
               reader.DataSource = new Uri(rShape["path"].ToString() + ".dbf", UriKind.RelativeOrAbsolute);                    
               vLayer.Reader = reader;
               vLayer.UseBitmapCache = false;
               vLayer.RefreshVirtualSource();
               this.radMapNaveo.Items.Add(vLayer);

 
Later I found that this is threading issue related to STA architecture, as it also throw the error "The calling thread must be STA,because many UI components require this". See the attachment.

Cheers. 
Petar Mladenov
Telerik team
 answered on 11 Feb 2015
6 answers
199 views
Hello,

I'm currently trying to simulate a step line series by using two values for one state. Basically my first attempt looks like this: https://dl.dropboxusercontent.com/u/55589036/Pictures/Screenshots/20150108152425.png

In two states my value is exactly 0 of the item in the data source of the line series and this will result in not being shown. In my opinion as long as the values are not negative the line between them should be printed.

How can I get this done?
Martin
Top achievements
Rank 1
 answered on 11 Feb 2015
1 answer
43 views
Hello, I am using a ChartView to plot values of a list. The "Category" of my list is simply a number sequence and it can be large (0 , 1000) for example.

If i use :
         <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:CategoricalAxis LabelStyle="{StaticResource axisLabelStyle}" />
         </telerik:RadCartesianChart.HorizontalAxis>

I cannot change the Step, so it is very hard to read.  What do you recommend i use, since my Category is just numbers.

thanks

Kevin


Peshito
Telerik team
 answered on 11 Feb 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?