Telerik Forums
UI for WPF Forum
1 answer
186 views

Hi, I have a shapefile from iran in UTM coordinates, I need to add the shape file to WPF, I added the shape file to my C# and XAML but it did not display. how can I resolve this problem ? if I should change the coordinate system, which coordinate system must be choose in Arc Map(GIS)?

C#

        public MainWindow()
        {
            InitializeComponent();
            fillData();
            this.MouseLeftButtonDown += delegate { this.DragMove(); };
            d_table2.ItemsSource = Dmus;
            d_table.ItemsSource = Dmus;
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }

        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            xShapeReader.Source = new Uri("shp9/Export_Output_9.shp", UriKind.Relative);
            xShapeReader.DataSource = new Uri("shp9/Export_Output_9.dbf", UriKind.Relative);
        }

XAML

                        <Grid x:Name="LayoutRoot">
                            <telerik:RadMap x:Name="radMap">
                                <telerik:RadMap.Provider>
                                    <telerik:EmptyProvider/>
                                </telerik:RadMap.Provider>
                                <telerik:InformationLayer x:Name="xInfo">
                                    <telerik:InformationLayer.Reader>
                                        <telerik:MapShapeReader x:Name="xShapeReader"/>
                                    </telerik:InformationLayer.Reader>
                                </telerik:InformationLayer>
                            </telerik:RadMap>

                        </Grid>

Martin Ivanov
Telerik team
 answered on 22 Sep 2021
1 answer
168 views

Hi,

We have made a small extension on the RadGridView to save/load user defined layouts.
What we noticed is that, when we set IsEnabled="{Binding ViewIsViewing}", the grid is always disabled for some reason.
After a long debugging session, we are 200% sure that our ViewIsViewing property is actually set to "True".
But for some reason, the IsEnabled property is set to False.

Is this expected behavior when you extend this UI Element? Or are we overlooking something here?
I can provide more details if needed.

Kind Regards
Tim

Stenly
Telerik team
 answered on 21 Sep 2021
1 answer
104 views

Currently RadGrid has two options for matching: 

MatchAllTerms = AND filter

MatchAnyTerm = OR filter

I'd like a 3rd options : SmartMatch - which should work much like Google searching: 

So, what it should do i make a ranked match by doing an OR filtering and then order by descending of number of matches pr row. 

This way the best matching items will be on top of the grid and the least matching items on the bottom.

This should be fairly easy to implement...

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Sep 2021
1 answer
129 views

I've got a Virtual Grid with 29 rows of data and 3 columns.  I want to have a function that copies all of its contents to the clipboard.  My handler looks like this:

    private void RadMenuItem_OnClick(object sender, RadRoutedEventArgs e)
    {
        // Select all cells and then copy them to the clipboard
        VirtualGrid.SelectAll();
        VirtualGrid.CopyToClipboard();
    }

I wrote my event handler for the CopyingCellClipboardContent event to use the cell row and column index to return the data item for whatever cell was requested:


    private void VirtualGrid_OnCopyingCellClipboardContent(object? sender, VirtualGridCellClipboardEventArgs e)
    {

        if (TryGetCellString(e.Cell.RowIndex, e.Cell.ColumnIndex, out var s))
            e.Value = s; 

        Debug.WriteLine($"Copying cell {e.Cell.RowIndex}, {e.Cell.ColumnIndex} => \'{e.Value}\'");
    }

And sure enough, my handler was called 87 times (29 rows x 3 columns).  But every single time it was called, the row and column index was exactly the same -- whatever row and column I had last clicked.   here is some of my debug output





SelectedSellsChanged
Copying
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'
Copying cell 1, 0 => '575.500, 1.000'


I can visually see the SelectAll() call selecting all the cells.  And my selection mode is Extended.  And it calls my handler the correct number of times.  

So why does it keep asking me for exactly the same cell all 87 times?  Shouldn't those row/column indices be changing?

 

 

Stenly
Telerik team
 answered on 20 Sep 2021
1 answer
140 views

Hi,

We have a gridview where we allow users to create custom expression columns, in the case where the expression they create will return DateTime values we'd like these custom columns to be grouped by date but the default groups on date and time.

I've managed to get this behaviour from data columns by setting the GroupMemberPath to the Date property of the DateTime object but for the expression columns as far as I can tell I can only use it to point towards the data whereas I need the grouping to be based on the result of the expression.

Is it possible to set the GroupMemberPath to the date part of the expression's result / is there any other way of getting the ColumnGroupDescriptor to group the column by the date part of the expression's result?

Stenly
Telerik team
 answered on 20 Sep 2021
1 answer
191 views

https://www.telerik.com/products/wpf/combobox.aspx

The doc above has "if you press a single character, it navigates to the first item starting with that character"

What properties are required to make the RadComboBox work in this way?
I've tried IsTextSearchEnabled="True" and TextSearchMode="StartsWith" but it does not work

I'm guessing that there may be a property to tell it to clear the first letter entered when the user enters another one
e.g. If user enters A then B they want to go to the first entry that starts with B

I have a RadComboBox.ItemTemplate to tell it which property to display
Do I also need to set something to tell it which property to match the typed character against?

Stenly
Telerik team
 answered on 20 Sep 2021
1 answer
196 views

Hi,

Many Chinese characters are displayed incorrectly when set theme for  GridView.

The display is correct when no theme is set.

I uploaded an app. It is displayed correct in left, and incorrectly in right.

天安 é—¨  display as  ã€‚
包    display as  

Martin Ivanov
Telerik team
 answered on 20 Sep 2021
0 answers
142 views
                           

Hi, I can see the map in preview, but not when I debug. Does anyone know why?

 

<telerik:RadMap x:Name="radMap" ZoomLevel="11" Center="35.675,+51.35" >
                         <telerik:RadMap.Provider>
                            <telerik:EmptyProvider />
                        </telerik:RadMap.Provider>
                        <telerik:VisualizationLayer>
                                    <telerik:VisualizationLayer.Reader>
                                <telerik:AsyncShapeFileReader DataSource="/WpfApp5;component/shp9/tt.dbf"
                                            Source="/WpfApp5;component/shp9/tt.shp">
                                </telerik:AsyncShapeFileReader>
                                    </telerik:VisualizationLayer.Reader>
                                </telerik:VisualizationLayer>
</telerik:RadMap>

ALI
Top achievements
Rank 1
 asked on 18 Sep 2021
1 answer
99 views

Hi all,

 

I have a chart : RadCarteisaonChart defined like this :
Is possible to change the Axis (X and Y) by Logarithmics Axis at runtime ?

Regards


 <telerik:RadCartesianChart Grid.Column="0" Margin="0,30,0,30" Foreground="{StaticResource DarkGray}">
                            <telerik:RadCartesianChart.HorizontalAxis>
                                <telerik:LinearAxis x:Name="hLinearAxis" ShowLabels="True">
                                </telerik:LinearAxis>
                                <!--<telerik:LogarithmicAxis x:Name="hLogarithmAxis" ShowLabels="True">
                                </telerik:LogarithmicAxis>-->                                
                            </telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:RadCartesianChart.VerticalAxis>
                                <telerik:LinearAxis x:Name="vAxis"/>
                            </telerik:RadCartesianChart.VerticalAxis>
                            <telerik:ScatterPointSeries x:Name="ChartCurve" XValueBinding="Concentration" YValueBinding="OpticalDensity" Foreground="{StaticResource DarkGray}">
                                <telerik:ScatterPointSeries.PointTemplate>
                                    <DataTemplate>
                                        <Ellipse Width="10" 
                                                Height="10" 
                                            Fill="{StaticResource ElectricBlue}"/>
                                    </DataTemplate>
                                </telerik:ScatterPointSeries.PointTemplate>
                            </telerik:ScatterPointSeries>
                            <telerik:RadCartesianChart.Grid>
                                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
                            </telerik:RadCartesianChart.Grid>
                            <telerik:RadCartesianChart.Annotations>
                                <telerik:CartesianCustomLineAnnotation Stroke="Red" StrokeThickness="2" HorizontalFrom="0" HorizontalTo="{Binding CONCMAX}" VerticalFrom="{Binding A}" VerticalTo="{Binding YMAX}" />
                            </telerik:RadCartesianChart.Annotations>
                        </telerik:RadCartesianChart>

Stenly
Telerik team
 answered on 17 Sep 2021
1 answer
239 views

Hello,

I had to create a template of the grid filtering control so I could replace the text entry control with a Watermark text entry control. Since I am not changing the functionality of the control, is it possible to get access to the code behind so I don't have to rewrite it?

Also, can you point to a good reference on the object model of the column filtering system so I can understand it better? 

Thanks,
Jack Allread

 

Dilyan Traykov
Telerik team
 answered on 15 Sep 2021
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?