Focus on RadMap on load and Mouse Wheel

5 posts, 1 answers
  1. DMC Helpdesk
    DMC Helpdesk avatar
    52 posts
    Member since:
    Nov 2007

    Posted 19 Sep 2011 Link to this post

    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.
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 21 Sep 2011 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. DMC Helpdesk
    DMC Helpdesk avatar
    52 posts
    Member since:
    Nov 2007

    Posted 22 Sep 2011 Link to this post

    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


  5. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 27 Sep 2011 Link to this post

    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 >>

  6. DMC Helpdesk
    DMC Helpdesk avatar
    52 posts
    Member since:
    Nov 2007

    Posted 02 Oct 2011 Link to this post

    Thansk Andrey. We really appreciate your support.

    Best Regards,

    DMC Helpdesk
Back to Top
UI for WPF is Visual Studio 2017 Ready