Telerik Forums
UI for WPF Forum
5 answers
296 views
Hello everyone,

I'm having some trouble with the WPF Map Control. On my application I'm generating about 2636 polygons (triangles) and attaching them to the Information Layer.

Each MapPolygon is being created like so: 

var polygon=New MapPolygon
                 {
               Fill = currentStyle.FillColor,
               Stroke = currentStyle.Stroke,
               StrokeThickness = currentStyle.Thickness,
               Opacity = currentStyle.Opacity,
               Points = new LocationCollection()
                                         {
                                         new Location(point.Y1, point.X1),
                                         new Location(point.Y2, point.X2),
                                         new Location(point.Y3, point.X3)
                                          }
              };

This operation works fine and my triangles are properly generated on the map. Pan operations are fluid and without trouble, but zooming operations (in and out) raise severe performance issues, from enourmous memory/processor consumption to a sort of "delay" between the time that I issue the zoom order and the time the order gets carried out by the map.

This problem only occurs with >1000 polygons on the map, regardless of type (rectangles, triangles, etc.).

So, I would like your help on this. First I must ask if there is any known performance limitation/cap related with this matter (gernerating polygons on the map)? If not, can you tell me what might be the cause for this trouble?
And secondly, what avaible workarounds are there that won't imply using a dynamic layer over the map to manage the objects?

Thanks in advance for the help and for the time taken with this matter!
Andrey
Telerik team
 answered on 23 Oct 2012
4 answers
308 views

I am trying a simple example of using resource groups as per "Programming Telerik ScheduleVIew for WPF/Silverlight (part 1) with simple mods.
I get the following error on the lines that define the groups as below:

Error 1 Only public or internal classes can be used within markup. 'Resource' type is not public or internal. 

<telerik:RadScheduleView.GroupDescriptionsSource>
      <telerik:GroupDescriptionCollection>
          <telerik:ResourceGroupDescription ResourceType="Activity"/>
      </telerik:GroupDescriptionCollection>
  </telerik:RadScheduleView.GroupDescriptionsSource>
  <telerik:RadScheduleView.ResourceTypesSource>
      <telerik:ResourceTypeCollection>
          <telerik:ResourceType Name="Activity">  (ERROR IS HERE)
              <telerik:Resource ResourceName="Morning Meds" />
              <telerik:Resource ResourceName="Evening Meds" />
          </telerik:ResourceType>
      </telerik:ResourceTypeCollection>
  </telerik:RadScheduleView.ResourceTypesSource>


The control worked until I inserted the group code above.


Here is entire XAML
<iCare:BaseUserControl x:Class="POCAClient.Views.TodaysActivities"
                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                       xmlns:icc="clr-namespace:POCAClient.UserControls"
                       xmlns:iCare="clr-namespace:POCAClient"
                       xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                       xmlns:local="clr-namespace:POCAClient.Views"
                        xmlns:schedule="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
                       mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"
                       Loaded="BaseUserControl_Loaded" >
    <iCare:BaseUserControl.Resources>
        <Style x:Key="ActivityListContainer" TargetType="{x:Type ListBoxItem}" >
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <ToggleButton Width="{Binding ActualWidth, ElementName=ItemsList}" x:Name="MainOuterToggleButton" Height="68" IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}">
                            <DockPanel DockPanel.Dock="Left" x:Name="PanelListItemBG" HorizontalAlignment="Left" Width="{Binding ActualWidth, ElementName=MainOuterToggleButton}" Height="{Binding ActualHeight,ElementName=MainOuterToggleButton}">
                                <Image x:Name="AppointmentImage" DockPanel.Dock="Left" Margin="4,4,2,3" Style="{StaticResource ListBoxItemPhotoStyle}" Source="{Binding Path=AppointmentImage}"></Image>
                                <TextBlock x:Name="StartTimeTextBlock" DockPanel.Dock="Top" Margin="6,4,2,3" TextTrimming="CharacterEllipsis" Style="{StaticResource ScrollingListItemHeaderStyle }" ToolTip="{Binding Path= Start, StringFormat= hh:mm tt}"  Text="{Binding Path= Start, StringFormat= hh:mm tt}" />
                                <TextBlock x:Name="SubjectTextBlock" DockPanel.Dock="Top" Margin="6,2,2,3" TextTrimming="CharacterEllipsis" Style="{StaticResource ScrollingListItemHeaderStyle}" ToolTip="{Binding Path= Subject}" Text="{Binding Path= Subject}" />
                            </DockPanel>
                        </ToggleButton>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter TargetName="PanelListItemBG" Property="Style" Value="{StaticResource SelectedListItemDockPanel}"/>
                                <Setter TargetName="StartTimeTextBlock" Property="Style" Value="{StaticResource SelectedListItemHeaderTextBlock}" />
                                <Setter TargetName="SubjectTextBlock" Property="Style" Value="{StaticResource SelectedListItemSubHeaderTextBlock}" />
                            </Trigger>
                            <Trigger Property="IsSelected" Value="false">
                                <Setter TargetName="PanelListItemBG" Property="Style" Value="{StaticResource DeselectedListItemDockPanel}"/>
                                <Setter TargetName="StartTimeTextBlock" Property="Style" Value="{StaticResource DeselectedListItemHeaderTextBlock}" />
                                <Setter TargetName="SubjectTextBlock" Property="Style" Value="{StaticResource DeselectedListItemSubHeaderTextBlock}" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </iCare:BaseUserControl.Resources>
  
    <Border  BorderBrush="{StaticResource BorderBorderBrush}"  BorderThickness="1" 
                    Background="{StaticResource GridBodyBrush}" DockPanel.Dock="Top" Margin="5">
        <DockPanel LastChildFill="True">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="373*" MinWidth="180"  MaxWidth="520" ></ColumnDefinition>
                    <ColumnDefinition Width="415*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="40"></RowDefinition>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <DockPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2">
                    <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" DockPanel.Dock="Top" Height="30" Margin="20,5,5,5" HorizontalAlignment="Left" VerticalAlignment="Center">
                        <TextBlock Style="{StaticResource PageHeaderTextBlockStyle}" Grid.ColumnSpan="2" FontSize="24" Foreground="#202C21" Text="Today is: "></TextBlock>
                        <TextBlock  x:Name="txtTodayDate" Style="{StaticResource PageHeaderTextBlockStyle}" Grid.ColumnSpan="2" Text="df sdfns dnfnsdf sdfsdf nsdfdf nsdfnsdf sdf" FontSize="24" Foreground="#202C21" DockPanel.Dock="Top"/>
                    </StackPanel>
                </DockPanel>
                <DockPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="0,0,415,0" HorizontalAlignment="Left" >
                    <telerik:RadScheduleView Name="radScheduleViewToday" Width="630" AppointmentsSource="{Binding Appointments}" >
                       <telerik:RadScheduleView.GroupDescriptionsSource>
                            <telerik:GroupDescriptionCollection>
                                <telerik:ResourceGroupDescription ResourceType="Activity"/>
                            </telerik:GroupDescriptionCollection>
                        </telerik:RadScheduleView.GroupDescriptionsSource>
                        <telerik:RadScheduleView.ResourceTypesSource>
                            <telerik:ResourceTypeCollection>
                                <telerik:ResourceType Name="Activity">
                                    <telerik:Resource ResourceName="Morning Meds" />
                                    <telerik:Resource ResourceName="Evening Meds" />
                                </telerik:ResourceType>
                            </telerik:ResourceTypeCollection>
                        </telerik:RadScheduleView.ResourceTypesSource>
                        <telerik:RadScheduleView.ViewDefinitions>
                            <telerik:TimelineViewDefinition MinorTickLength="1h" MajorTickLength="2h" VisibleDays="1"/>
                        </telerik:RadScheduleView.ViewDefinitions>
                    </telerik:RadScheduleView>
                </DockPanel>
                <DockPanel Grid.Column="1" Grid.Row="1" Margin="42,0,0,0">
                    <Border BorderBrush="{StaticResource GridBorderBrush}" BorderThickness="2" Margin="3"
                Background="{StaticResource GridBodyBrush}" Width="384">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
  
                            <DockPanel LastChildFill="True" Margin="10,15,0,30" DockPanel.Dock="Left" >
                                <TextBlock x:Name="txtNotesHeader"  DockPanel.Dock="Top" Margin="3" Foreground="#0C4F95" FontSize="17" FontWeight="Bold" Text="Notes" TextWrapping="WrapWithOverflow"/>
                                <ScrollViewer DockPanel.Dock="Right" Style="{StaticResource EasyAccessScrollViewer}" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                                    <TextBlock  x:Name="txtNotes" Style="{StaticResource TextBlockStyle}" Margin="3,0,10,0" TextWrapping="WrapWithOverflow"></TextBlock>
                                </ScrollViewer>
                            </DockPanel>
                        </Grid>
                    </Border>
                </DockPanel>
            </Grid>
        </DockPanel>
    </Border>
</iCare:BaseUserControl>
Ioan Crisan
Top achievements
Rank 1
 answered on 23 Oct 2012
4 answers
553 views

Hi!,

I was watching a sample when a radWindow is opened in modal way. My question is, if it's possible to change the darkened color due to our app has a background little darkened (xbap) and summarized with telerik control gets too much darkened

thanks

Boyan
Telerik team
 answered on 23 Oct 2012
1 answer
126 views
Export from RadGridView til Excel is still a bit strange:

I used the Telerik Wpf example "Word, Excel, CSV Export.

1. I choose "Excel" and I save te file as ExcelTest.xls
- I get a warning about the format when opening the file in Excel
- Most of the data is changed to text/string.
2. I choose "Excel" and I save te file as ExcelTest.xml
- I get a warning about the format when opening the file in Excel
- Most of the data is changed to text/string.
3. I choose "ExcelML" and I save te file as ExcelTest.xml
- All the data is changed to text/string.

What I expected is:
- No warning from Excel about the format.
- Numbers stay numbers, dates stay dates, money stays money... and so on.

What am I doing wrong?
Dimitrina
Telerik team
 answered on 23 Oct 2012
3 answers
206 views
I don't see any insert adorner support in ListBoxDragDropBehavior. (or at least it is not something can be done as simple as  ScreenshotDragVisualProvider). Being able to tell where to drop visually is extremely important to our application. If someone shed some light on this area I will be appreciated.
Georgi
Telerik team
 answered on 23 Oct 2012
14 answers
616 views
Can the RadPane be maximised or shown as full-screen window?
Georgi
Telerik team
 answered on 23 Oct 2012
4 answers
179 views
Is it possible to print the contents of the RadTreeView?
Tina Stancheva
Telerik team
 answered on 22 Oct 2012
4 answers
440 views
I am binding my RadPropertyGrid to an object that contains a "property bag" - in other words, the object has a collection of child objects that represent the properties displayed in the property grid.  This collection is populated from a database so there is no knowledge at all in the application of the names, values, etc. for any of the 'properties'.

The object subclasses CustomTypeDescriptor, overrides GetProperties and returns a custom PropertyDescriptor for each of the items in the collection.  All of this works great except for cases where I need the user to select from a list of options.  Note that the list of options is NOT an enumeration but a collection of name/value pairs obtained from the database.

So the question is how to display a combobox in the property grid that is bound dynamically?

I've seen the other forum posts and examples using the LookupPropertyDefinition but they all use static references in the XAML to the property names and use static resources as the ItemsSource.  Neither of these are possible in my case as I won't know which 'properties' have options until runtime as the list is configurable in the database.  In addition, the list of choices is pulled out of the database so it will be different for each 'property'.

In previous incarnations of our application, we've been able to simply define a custom TypeConverter for the property, override the GetStandardValuesSupported method to return true then override GetStandardValues which would return the list of choices.  As I have learned from other posts, this is not supported in the RadPropertyGrid.  So what is?

Your help is greatly appreciated as this is a significant enough feature and enough time has been spent trying to get it working that it could lead us to another vendor that is capable of supporting this need.
Ivan Ivanov
Telerik team
 answered on 22 Oct 2012
4 answers
149 views
Every time we try to print a Document a white Space is added below every page. Even the sample from the Demo-App shows this Problem. We tested this on several machines with different Printers. We use the newest Assemblies (2012.2.1015.40). Attached is a Screenhot from a PDF-File that shows the default Sample from the Demo App printed via PDFCreator. We tried to change the SectionDefaultPageMargin, SectionDefaultPageSize, footer content, PrintSettings.PrintScaling, but nothing solves the issue.
H.-G.
Top achievements
Rank 1
 answered on 22 Oct 2012
12 answers
162 views
Hi, I have some ghosting problem with the TreeListView. Whenever I expand a row most (not all) rows become un-expandable, this can be fixed if I have many rows and can scroll down/up the treelistview.  What can be triggering this behavior I'm running Q2 2012 Sp2.

Please can you help me with this.

Cheers
kristján
Kristjan Einarsson
Top achievements
Rank 1
 answered on 22 Oct 2012
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?