This is a migrated thread and some comments may be shown as answers.

Focus on RadMap on load and Mouse Wheel

4 Answers 91 Views
Map
This is a migrated thread and some comments may be shown as answers.
DMC Helpdesk
Top achievements
Rank 1
DMC Helpdesk asked on 19 Sep 2011, 01:43 PM
Hi,

I have a requirement to have the focus on RadMap when the form is loaded.I tried both:

FocusManager.FocusedElement="{Binding ElementName=radMap1}"
and
private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            radMap1.Focusable = true;
            radMap1.Focus();
        }

But with no luck.I need to use the mouse wheel to move to different areas in the map.This is not working until i click once on the map.The reason i want to avoid clicking on the map is that I am drawing a MapPolygon by combining each click point on the map.

Thanks in advance.

4 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 21 Sep 2011, 03:07 PM
Hi Dmc Helpdesk,

Thank you for the feedback. This problem has been already fixed. Please, download the latest internal build available under Your Account.

All the best,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
DMC Helpdesk
Top achievements
Rank 1
answered on 22 Sep 2011, 07:24 AM
Hi Andrey,

Is there a quick way to fix this without the latest internal build?.Our current version is 'RadControls for WPF 2011.1 419', and we do not have access to latest internal builds since we only have got Free major updates until: May 31, 2011.

Thanks


0
Accepted
Andrey
Telerik team
answered on 27 Sep 2011, 11:43 AM
Hi Dmc Helpdesk,

As a workaround for this build you can use a code like the following:
using System;
using System.Windows;
using System.Windows.Input;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Map;
 
namespace TestQ1Build419
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }
 
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            this.radMap1.Focusable = true;
            this.radMap1.Focus();
 
            var eventArgs = new MouseButtonEventArgs(Mouse.PrimaryDevice, Environment.TickCount, MouseButton.Left);
            eventArgs.RoutedEvent = UIElement.MouseLeftButtonUpEvent;
            this.radMap1.RaiseEvent(eventArgs);
        }
    }
}

Best wishes,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
DMC Helpdesk
Top achievements
Rank 1
answered on 02 Oct 2011, 06:56 AM
Thansk Andrey. We really appreciate your support.

Best Regards,

DMC Helpdesk
Tags
Map
Asked by
DMC Helpdesk
Top achievements
Rank 1
Answers by
Andrey
Telerik team
DMC Helpdesk
Top achievements
Rank 1
Share this question
or