Telerik Forums
UI for WPF Forum
2 answers
164 views
Hi,

I have drawn a MapEllipseGeometry on the Map at 100 km radius. If I then calculate the distance between the centre and the edge I am getting a result of 100.95 km. (I am determining the edge point latitude and longitude by dragging a pin to the edge to get the 2nd )

I am using a method suggested in these forums to calculate the distance between the 2 points.

public static double DistanceBetween(double lat1, double lng1, double lat2, double lng2)
{
    Location northEast = new Location(Math.Max(lat1, lat2), Math.Max(lng1, lng2));
    Location southWest = new Location(Math.Min(lat1, lat2), Math.Min(lng1, lng2));            
    
    LocationRect rect = new LocationRect(northEast, southWest);           
   
    rect.MapControl = new RadMap();           
   
    double distance = Math.Sqrt(rect.Width * rect.Width + rect.Height * rect.Height);           
   
    return distance;
}

This is a about a 1% error, any ideas why this could be the case?

Thanks
Anthony
Anthony
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 12 Mar 2014
1 answer
76 views
Is there a way to change the RadDiagramConnection line to be a broken-dashed line ? Something like this ( -------> )

Brett
Top achievements
Rank 1
 answered on 12 Mar 2014
1 answer
182 views
I'm looking though the documentation trying to figure out how far the Nudge command moves an item in a diagram.  I'm also interested in how you can perform a Nudge command programmatically.  Any help would be appreciated, thanks.
Tina Stancheva
Telerik team
 answered on 11 Mar 2014
1 answer
206 views
I wanted to know is there a way to bind to the header checkbox IsChecked property of the GridViewSelectColumn. I want to add logic that if a selection is made in the grid, change the header checkbox to null.
Yoan
Telerik team
 answered on 11 Mar 2014
1 answer
182 views
We have a control where a user can select multiple rows in a RadGridView and we store the selected items. No problem. However, if the user later returns to the control and pops up the grid to select more items, the previous selections are not automatically selected already despite the synchronization code (from another post here - keeps the SelectedItems and another collection synchronized).

So how does one programmatically toggle the IsSelcted for the rows based on the SelectedItems property? When the grid is loaded, the SelectedItems is synchronized with the collection of objects already synchronized, but the GridViewSelectColumn does not display the checkbox as selected so it looks like nothing is selected even though the collection is populated with objects.

I read one post which suggested using a style trigger but that only works if the rows are visible. These grids can have hundreds or thousands of records.

Steve
Dimitrina
Telerik team
 answered on 11 Mar 2014
3 answers
112 views
Hi, I am trying to drag drop a text file on the
RadGridView cells and I am having some issues. What I am trying to accomplish
is; when I drop the textfile (or any type of file) on a GridCell or
GridHeaderCell , I am going to open another screen for user to enter more
information. That screen will have that file's physical file path and some more
information from the cell which it was dropped on. 

So, regular GridCell is working fine but when I
drop the file on the GridHeaderCell, it does not allow me unless I put a
breakpoint on OnDropQuery method. Without the breakpoint headercells are
not available to drop the file on.



OnDropQuery method is
in MainWindow.xaml.cs. I have a sample project prepared but couldnt attach
it to the thread.



Please let me know, if you need any additional
information. 



Thanks in advance...
Nick
Telerik team
 answered on 11 Mar 2014
4 answers
122 views
Hi,

    After I upgraded to version 2013.3.1204.45, I am no longer able to drag and drop external files to the GridView on my XBAP application.

   Before the upgraded, I used the "RadDragAndDropManager.EnableNativeDrag = True " to allow drag and drop to my XBAP application and it worked very well. 

   With this new DragAndDropManager, what is the setting I have to set so I can have the drag and drop from extenernal program?
    
Thanks,
Chris
Yoan
Telerik team
 answered on 11 Mar 2014
1 answer
159 views
Then I click on a MaskedTextInput, it's all selected and in insert mode, so if I have '8888' in the value and press 1, everything is replaced by 1.

When I set the focus on the code behind, I press '1' and get '1888' then when I press 1 again I get '11888' .  It's very strange behavior.

I have some sample code below.  When you press the button I programmatically set the focus on the RadMaskedTextInput.  Compare this to when you selected it with a mouse, or tab to it:

<Window x:Class="FocusOnTextBox6.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.Resources>
            <Style x:Key="UpperCodes6Mask" TargetType="telerik:RadMaskedTextInput">
                <Setter Property="FontFamily" Value="Segoe UI" />
                <Setter Property="Margin" Value="0 0 0 0" />
                <Setter Property="Width" Value="60" />
                <Setter Property="Height" Value="20" />
                <Setter Property="Padding" Value="0" />
                <Setter Property="Placeholder" Value=" " />
                <Setter Property="IsClearButtonVisible" Value="False" />
                <Setter Property="TextMode" Value="PlainText" />
                <Setter Property="SectionsNavigationMode" Value="None" />
                <Setter Property="IsLastPositionEditable" Value="False" />
                <Setter Property="InputBehavior" Value="Insert" />
                <Setter Property="SelectionOnFocus" Value="SelectAll" />
                <Setter Property="Mask" Value=">a6" />
            </Style>
        </Grid.Resources>
        <StackPanel Orientation="Horizontal">
            <telerik:RadMaskedTextInput Margin="3 0 0 0" Height="20" Padding="0"  Style="{StaticResource UpperCodes6Mask}"
                    Name="tbClid" />
 
            <TextBox Name="tbTest" Margin="10 0 0 0" Height="25"  Width="50"/>
            <Button Name="btnTest" Margin="20 0 0 0" Content="Test Focus" Height="25" Width="100" Click="btnTest_Click" />
 
            <Button Name="btnTestRegular" Margin="20 0 0 0" Content="Test Focus TextBox" Height="25" Width="100" Click="btnTestRegular_Click" />
 
        </StackPanel>
    </Grid>
</Window>


namespace FocusOnTextBox6
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void btnTest_Click(object sender, RoutedEventArgs e)
        {
            tbClid.Value = "8888";
            tbClid.Focus();
 
        }
 
        private void btnTestRegular_Click(object sender, RoutedEventArgs e)
        {
 
            tbTest.Text = "9999";
  
            tbTest.Focus();
            tbTest.SelectAll();
        }
    }
}

Peshito
Telerik team
 answered on 11 Mar 2014
1 answer
84 views
Hello,
when a column is defined as right aligned, and it is sorted, the sort indication is inside the header text in the Office2013 theme, as you can see in the attached screenshot.
Note that the same problem appears when the column is not large enough to display the header text completely.
Patrick
Yoan
Telerik team
 answered on 11 Mar 2014
1 answer
113 views
I have a carousel with 12 items, but only 5 items per page.
When trying to bring into view one of the items that are not in the current page, the BringDataItemIntoView  method will not work.

Can you please tell me how to obtain this?

Thank you.
Yoan
Telerik team
 answered on 11 Mar 2014
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?