Telerik Forums
UI for WPF Forum
3 answers
157 views
Our clients typically import data into our application using known coordinate systems, such as UTM. However, now we need to add support for unknown, arbitrary coordinate systems (we won't show an underlying basemap). I am struggling with this. My understanding is I should use an EmptyProvider and the EPSG900913Projection. I have several issues, but the first is the Center. In your Mercator (meters) example, the Center is set using meters:

Center="296247.258782387,426130.145788193"

However, when I create a blank project and set the Center using meters, the value contained in the center is still in decimal degrees:

moMap.Center = New Location(5643603, 2559429)

Printing moMap.Center shows the following:
{85.05112878,180}
    CalculationMethod: ""
    Description: ""
    Empty: {-Infinity,-Infinity}
    IsEmpty: False
    Latitude: 85.05112878
    Longitude: 180.0

What am I doing wrong? Once working, will all the other map methods and properties return values in meters instead of degrees, too?
Petar Mladenov
Telerik team
 answered on 23 Jan 2015
1 answer
206 views
Hi There

1. With InformationLayer Map Shape, MapPolyLine i was able to set zoom range value and style dynamically, like code below, looking for equivalent code for PolyLineData.

This works;
MapPolyline polylinedata = new MapPolyline()            
            polylinedata.SetValue(MapLayer.ZoomRangeProperty, new ZoomRange(2, 9));
            polylinedata.SetValue(MapLayer.BaseZoomLevelProperty, 5);
            polylinedata.SetValue(MapLayer.MaxScaleProperty, 5);
            polyline.Style = this.Resources["selectedPolyLineStyle"] as Style;   

Code below doesn't work;
PolylineData polylinedata = new PolylineData();
           polylinedata.SetValue(MapLayer.ZoomRangeProperty, new ZoomRange(2, 9));
           polylinedata.SetValue(MapLayer.BaseZoomLevelProperty, 5);
           polylinedata.SetValue(MapLayer.MaxScaleProperty, 5);
           polyline.Style = this.Resources["selectedPolyLineStyle"] as Style;

2. I have some 3K PolylineData framework elements which I'm creating dynamically live above , adding each of them to VirtualizationLayer in loop.This is quick but the because of 3K pPolylineData the Zoom and Panning performance is degraded.Kindly suggest the right approach.

Thanks in Anticipation

Thanks in Anticipation
Petar Mladenov
Telerik team
 answered on 23 Jan 2015
1 answer
136 views
I'm currently using the RadDiagram with MVVM. Inside my SerializableGraphSourceBase I have the overridden SerializeNode. When Saving the xml of my diagram this works as expected for all my basic properties such as

public string Header { get; set; }

I'm wondering if there is a way to do this for a property that is a list or collection

public ObservableCollection<DiagramNodeProperty> DiagramNodeProperties { get; set; }

Any help would be greatly appreciated.
Pavel R. Pavlov
Telerik team
 answered on 23 Jan 2015
2 answers
125 views
Hi.

I have updated the latest version of the telerik dlls for schedule view and the drag/drop behavior stopped working. I do not have this problem for the RadListBox, all works as it previously did.

the setup is this:
<telerik:RadScheduleView.DragDropBehavior>
<localScheduler:ScheduleViewLevel1DragDropBehavior />
</telerik:RadScheduleView.DragDropBehavior>

public class ScheduleViewLevel1DragDropBehavior : ScheduleViewDragDropBehavior
    {
        public override bool CanStartDrag(DragDropState state)
        {
            return true;
        }
        public override bool CanResize(DragDropState state)
        {
            return false;
        }
        public override bool CanDrop(DragDropState state)
        {
            //...
                return true;
        }
        public override void Drop(DragDropState state)
        {
            //...
        }
}

On the Appointment template I used                 telerik:DragDropManager.AllowDrag="True"

Everything was working ok before I updated the dlls , now none of the override methods in the ScheduleViewDragDropBehavior  are hit. 

Nasko
Telerik team
 answered on 22 Jan 2015
9 answers
161 views
My WPF app allows users to select between 4 accent colors. When they do, I update the Office2013Palette colors accordingly. On my own development machine this is working great: as I change the Office2013Palette all the colors in the app are updated in real-time. But when I deploy the application on Citrix the colors do not change immediately. Instead, it seems that the controls are only updated as they are reloaded/redrawn, for example, when switching between pages in the application.

Is there a way to perhaps force an update of the colors?
Sia
Telerik team
 answered on 22 Jan 2015
5 answers
242 views
Hello,

I'm using my own Collection Implementation and bind this to GridView 
public class BindingTypedList<T> : Collection<T>, INotifyCollectionChanged
{
    publicvoid AddRange(IList<T> items)
    {
        foreach(T item in items)
        {
            this.Add(item);
        }
        FireCollectionChanged(items);
    }
     
    public void FireCollectionChanged(IList<T> items)
    {
        try
        {
            if (CollectionChanged != null)
                CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, items.ToList()));
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message + "\n" + ex.StackTrace);
        }
    }
    public event NotifyCollectionChangedEventHandler CollectionChanged;
}
I have an exception in FireCollectionChanged Funktion:

---------------------------
Index must be within the bounds of the List.


Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)


   at System.Collections.Generic.List`1.Insert(Int32 index, T item)


   at Telerik.Windows.Data.KeyedCollection.Insert(Int32 index, Object value) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\KeyedCollection.cs:line 179


   at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1476


   at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1340


   at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1817


   at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1797


   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:line 33


   at FileExplorer.ViewModel.BindingTypedList`1.FireCollectionChanged(IList`1 items) in D:\Y\IZTMediaContainer\IZTMediaLibrary\ViewModel\DirInfo.cs:line 65
---------------------------


Could you please help me.
Ivan Ivanov
Telerik team
 answered on 22 Jan 2015
1 answer
386 views
Hi Team,

Does anyone know if there is a way of getting the DialogResult without having to put the result in yourself?  

Just a basic result like Ok, and Cancelled for a dialog kind of window will do.

Is/should this be  possible?

Thx,

Richard

Kalin
Telerik team
 answered on 22 Jan 2015
8 answers
521 views
Hello

I need some ToolTips for the column headers in a RadGridView. I specified the following:
<telerik:RadGridView.Resources>
    <Style TargetType ="{x:Type telerik:GridViewHeaderCell}">
        <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>
    </Style>
</telerik:RadGridView.Resources>

and for th column:
<telerik:GridViewDataColumn Header="Type"  DataMemberBinding="{Binding Path=DriveType}" ToolTip="Drive Type" />

As soon as i hover over the column header, the app crashes with:
    "Specified element is already the logical child of another element. Disconnect it first."
I get the same result if i put the style into the Window.Resources.
What do i have to do?

Thanks for help
Peter
Stefan
Telerik team
 answered on 22 Jan 2015
7 answers
659 views
There really should be be a Click and Command on Tile. Without it you have to go through the hassle of creating a button with a modern flat style ControlTemplate. Or is there another way?
Boris
Telerik team
 answered on 22 Jan 2015
1 answer
170 views
Hi There

I'm loading locations from memory and creating PolylineData and total such PolylineData being created are around 3K, and adding each PolylineData object to the VirtulizationLayer, in a loop.

for (i = 0; i < 3000; i++)
               {
                   LoadZones();
               }

Ignore the fact that i am creating all PolylineData element on same location in example below,what I'm trying to highlight is need to create them in loop and add them.

protected void LoadZones()
       {
           PolylineData polyline = new PolylineData()
           {
               ShapeFill = new MapShapeFill()
               {
                   Stroke = new SolidColorBrush(Colors.Red),
                   StrokeThickness = 2,
                   Fill = Brushes.Blue,
               }
           };
           LocationCollection points = new LocationCollection();
           points.Add(new Location(-20.0791497684858, 57.5683593750001));
           points.Add(new Location(-20.04819100048355, 57.6390838623048));
           points.Add(new Location(-20.082374288709, 57.6507568359376));
           points.Add(new Location(-20.0791497684858, 57.5683593750001));
 
           polyline.Points = points;
           this.visualizationLayer.Items.Add(polyline);
       }

The load is quick, but there is performance loss in Zoom and Panning.

1. Just like we can add heavy shape files into VisualizationLayer.VirtualizationSource using MapShapeDataVirtualizationSource AychReader,can we add PolylineData framework elements similarly.

this.mapShapeDataReader.SourceCollection.Add(
                      new AsyncReaderSource()
                      {                         
                          //Add PolygoneData Object 
                      });

If not , what would be best approach to add large numbers of PolylineData framework elements to Virtualization Layer dynamically.without performance loss.

Thanks In Anticipation



Petar Mladenov
Telerik team
 answered on 22 Jan 2015
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?