Telerik Forums
UI for WPF Forum
1 answer
249 views
Hi!
How can i create a template that works on every element in a kml file i load from my computer?

.cs:
Loading the kml file works fine:   

            try
            {
                FileStream streamResource = File.Open("c:\\mapsource\\wildlife.kml",FileMode.Open,FileAccess.Read);
                List<FrameworkElement> elements = Telerik.Windows.Controls.Map.KmlReader.Read(streamResource);


                foreach (FrameworkElement element in elements)
                {
                    this.informationLayer.Items.Add(element);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("Error: " + e);
            }

.xaml:
<StackPanel>
        <Label HorizontalContentAlignment="Center" Content="Map" Width="{Binding Source={StaticResource configSource}, Path=DefaultMapWidth}" Height="30" Background="Gray"></Label>
        <telerik:RadMap x:Name="radMap"  Width="{Binding Source={StaticResource configSource}, Path=DefaultMapWidth}" Height="{Binding Source={StaticResource configSource}, Path=DefaultMapHeight}"
                            MouseDragMode="Drag"
                            ZoomBarVisibility="Collapsed"
                            NavigationVisibility="Collapsed">
            <telerik:InformationLayer x:Name="informationLayer">
                <telerik:InformationLayer.ItemTemplate>
                    <DataTemplate>
                        <Grid telerik:MapLayer.BaseZoomLevel="5" >
                            
                        </Grid>
                    </DataTemplate>
                </telerik:InformationLayer.ItemTemplate>
                <!--<telerik:InformationLayer.Reader>
                    <telerik:MapShapeReader Source="c:/mapsource/Oil_Spills.kml" SourceType="Kml"/>
                </telerik:InformationLayer.Reader>-->
            </telerik:InformationLayer>
        </telerik:RadMap>
    </StackPanel>


KML:
Here's a part of the kml file that i'm using:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
        <Document>
        <name>wildlife-national-parks-india.kml</name>


        <Placemark>
        <name>Anshi National Park</name>
              <description>
                <![CDATA[
                  <p>Wildlife: Bonnet Macaque, Deer, Mouse Deer, Spotted Deer, Indian Bison, Malabar Civet, Malabar Giant Squirrel, Pangolin, Sloth Bear, Black Panther, Elephants, Tigers, Adjutant Stork, Ashy Woodswallow, Black-cre... </p>
                  <p>Plan your wildlife adventure holiday to <a href="http://www.world-wildlife-adventures.com/directory/india/wildlife-park.asp?sanctuary=Anshi+National+Park&state=Karnataka">Anshi National Park</a>, India...
                   read reviews by fellow wildlife enthusiasts, and share your own.  For information about other parks in India and the rest of the world visit: <a href="http://www.world-wildlife-adventures.com/">World Wildlife Adventures</a></p>
                ]]>
              </description>
        <Point>
        <coordinates>74.39598,15.07237,0</coordinates>
        </Point>
        </Placemark>
        <Placemark>
        <name>Balphakram National Park</name>
              <description>
                <![CDATA[
                  <p>Wildlife: Indian Elephant, Bengal Tiger, Leopard, Clouded Leopard, Wild Buffalo, Gaur (Indian Bison), Muntjac (Barking Deer), Hoolock (White-browed) Gibbon, Assamese Macaque, Pig-tailed Macaque, Capped Langur (... </p>
                  <p>Plan your wildlife adventure holiday to <a href="http://www.world-wildlife-adventures.com/directory/india/wildlife-park.asp?sanctuary=Balphakram+National+Park&state=Meghalaya">Balphakram National Park</a>, India...
                   read reviews by fellow wildlife enthusiasts, and share your own.  For information about other parks in India and the rest of the world visit: <a href="http://www.world-wildlife-adventures.com/">World Wildlife Adventures</a></p>
                ]]>
              </description>
        <Point>
        <coordinates>90.82664,25.25261,0</coordinates>
        </Point>
        </Placemark>


It's important that i'm able to format the name and description.
I did not find any examples on this, so i hope you can help.

Thanks in advance.
Andrey
Telerik team
 answered on 09 Feb 2011
1 answer
71 views

Hello,
I want that RadRibbonGroup exit after "Click"
 enent.
I have attached sample code here.

Thanks

 

</telerik:RadRibbonTab>
<telerik:RadRibbonTab x:Name="tab3" Header="num2">
<telerik:RadRibbonGroup Header="num2_1">
<telerik:RadRibbonButton Text="num2_1" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="num2_2">
<telerik:RadRibbonButton Text="num2_2" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="num2_3">
<telerik:RadRibbonButton Text="num2_3" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>
</telerik:RadRibbonTab>

 

 

 

 

<telerik:RadRibbonTab x:Name="tab4" Header="num3">
<telerik:RadRibbonGroup Header="num3_1">
<telerik:RadRibbonButton Text="num3_1" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="num3_2">
<telerik:RadRibbonButton Text="num3_2" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="num3_3">
<telerik:RadRibbonButton Text="num3_3" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>
<telerik:RadRibbonGroup Header="num3_4">
<telerik:RadRibbonButton Text="num3_4" Click="RadRibbonButton_Click_1"/>
</telerik:RadRibbonGroup>

 

 

 

 

</telerik:RadRibbonTab>
</telerik:RadRibbonBar>

 

 

 

 

Petar Mladenov
Telerik team
 answered on 08 Feb 2011
1 answer
71 views
hi, is it possible to change the borderstyle of a radgridview according to a cell value?
Vanya Pavlova
Telerik team
 answered on 08 Feb 2011
1 answer
158 views
I have enabled Column Resizing (CanUserResizeColumns="True") for my GridView.  When I attempt to resize the columns I see the left and right arrow while hovering over the column edge.  When I click and drag the mouse to resize the column, the column resize a couple of pixels and then the whole column header starts to drag like when you re-order the columns. My GridView is defined as follows:

<telerik:RadGridView x:Name="gridViewAccounts" Grid.Column="1" Grid.Row="2" telerikGridViewFilter:CustomFilterRow.IsEnabled="False" RowDetailsTemplate="{StaticResource AccountRowDetailsTemplate}" ColumnWidth="*" HorizontalAlignment="Stretch" SelectionMode="Extended" telerikDragDrop:RadDragAndDropManager.AllowDrag="True" telerikDragDrop:RadDragAndDropManager.AllowDrop="True" Loaded="gridViewAccounts_Loaded" AutoGenerateColumns="False" CanUserFreezeColumns="False" SelectionUnit="FullRow" AddingNewDataItem="gridViewAccounts_AddingNewDataItem" ShowInsertRow="False" RowDetailsVisibilityMode="Collapsed" Pasting="gridViewAccounts_Pasting" Copying="gridViewAccounts_Copying" CanUserResizeColumns="True" AllowDrop="True">

This may be related to another problem I am experiencing.

http://www.telerik.com/community/forums/wpf/gridview/filtering-dialog-immediately-closes.aspx

 

 

 

 

 

 

 

 

 

Ivan Ivanov
Telerik team
 answered on 08 Feb 2011
1 answer
103 views
I am using a slider with selectionRange enabled as well as well as with visible handles. In the control template I can see that those arrow buttons are reapeatButtons, however they seem to have behaviour of the standard button (repeat doesn't work). So if I press and hold the arrow key, it doesn't seem to fire multiple click events.
Petar Mladenov
Telerik team
 answered on 08 Feb 2011
4 answers
156 views
Hello,

I've got a WPF application with  radmenu and a radgrid. (v.2010.3.110.35)
When I click on a row in te grid, the menu-items are disabled in the main-menu, when I drag a column from the grid on the grouping header and remove it again the menu-items in de main menu are enabled again.

What could cause this problem?

I am using the code below to create the menu. 
var cba = new CommandBinding(MenuCommands.TileView, GoToPageExecuteHandler, GoToPageCanExecuteHandler);
            CommandBindings.Add(cba);
            var cbas = new CommandBinding(MenuCommands.Search, GoToPageExecuteHandler, GoToPageCanExecuteHandler);
            CommandBindings.Add(cbas);

MenuResources.Culture = Thread.CurrentThread.CurrentCulture;
               var baseItem = new RadMenuItem();
               var TileView = new RadMenuItem();
               var Search = new RadMenuItem();
               var Carousel = new RadMenuItem();
               baseItem.Header = MenuResources.Base;
               //TileView
               TileView.Command = MenuCommands.TileView;
               TileView.CommandParameter = MenuUrls.Url(MenuResources.InTileView);
               TileView.Header = MenuResources.InTileView;
               TileView.IsEnabled = true;
               baseItem.Items.Add(TileView);
               //Search
               Search.Command = MenuCommands.Search;
               Search.CommandParameter = MenuUrls.Url(MenuResources.Search);
               Search.Header = MenuResources.Search;
               Search.IsEnabled = true;
               baseItem.Items.Add(Search);
               ApplicationMenu.Items.Insert(0, baseItem);
               MenuCommands.MenuSet = true;

private void GoToPageCanExecuteHandler(object sender, CanExecuteRoutedEventArgs e)
       {
           e.CanExecute = true;
       }

Aardlek
Top achievements
Rank 1
 answered on 08 Feb 2011
1 answer
125 views
Hi,
I'm trying to apply filter in the rad tree list view, but i want one thing to not to be happend.

Please find the attached image of my result after filtering.

In the image i applied filter to "Project Technical Leaders" including its only next childs.

Now, what I want is that, its child should not be expanded.
i.e.
SrMgr_SRMgr13
SrMgr_SRMgr10
SrMgr_SRMgr9
should be visible only in collapsed form.
Because if we expand them, it take a lot of time to fetch data for all the child, but as filtering is applied, that data is not visible.

Please help me as soon as possible.

Thanks.
Vlad
Telerik team
 answered on 08 Feb 2011
3 answers
194 views
Hi,

I have a requirement to show a grid with a column which is when clicked, a rich text box in a popup (adjacent to the clicked cell) should appear.

I saw a similar implementation of DatePicker in online documentation. Is there anything in-built way of implementing my requirement? If not, recommended solution?

Thanks,
AK
Vlad
Telerik team
 answered on 08 Feb 2011
4 answers
91 views
I am using the standard filtering with the the GridView control.  When I click on the filter button in the column header the filter dialog is displayed.  When I attempt to click anything inside the filter dialog it immediately closes.  It does not matter where in the filter dialog I click.
Stefan
Top achievements
Rank 1
 answered on 08 Feb 2011
3 answers
205 views
If I open a popup window which contains a text box the contents of the box lags behind the keyboard.

The window is opened as:
           
RadWindow host = new RadWindow();
host.Content = new UserControl1();
host.ShowDialog();

where UserControl1 contains a combo box and a text box inside a standard UserControl

Konstantina
Telerik team
 answered on 08 Feb 2011
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?