equivalent for ystem.Windows.Automation.AutomationElement

4 posts, 0 answers
  1. Chetan
    Chetan avatar
    26 posts
    Member since:
    Oct 2012

    Posted 28 Jan 2014 Link to this post

     please see following code
    this wont work with radwindow.

    please let me know any equivalent code with rad window.

    here New WindowInteropHelper(Me).Handle not work as Me is telerik rad window and not system window.
    Imports Telerik.Windows.Controls
     
    Imports System.Windows
    Imports System.Windows.Interop
     
    Class MainWindow
        Inherits RadWindow
     
        Public Sub New()
            InitializeComponent()
            ' Disables inking in the WPF application and enables us to track touch events to properly trigger the touch keyboard
            InkInputHelper.DisableWPFTabletSupport()
            AddHandler Me.Loaded, AddressOf MainWindow_Loaded
        End Sub
     
        Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs)
            ' Enables WPF to mark edit field as supporting text pattern (Automation Concept)
            Dim asForm As System.Windows.Automation.AutomationElement = System.Windows.Automation.AutomationElement.FromHandle(New WindowInteropHelper(Me).Handle)
     
            'Dim asForm As Telerik.Windows.A = System.Windows.Automation.AutomationElement.FromHandle(New WindowInteropHelper(Me).Handle)
     
            '' Windows 8 API to enable touch keyboard to monitor for focus tracking in this WPF application
            Dim inputPanelConfig As New InputPanelConfigurationLib.InputPanelConfiguration()
            inputPanelConfig.EnableFocusTracking()
        End Sub
     
    End Class
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 30 Jan 2014 Link to this post

    Hi,

    We are not sure we understand the hole scenario but you could use the RadWindowInteropHelper rather than WindowInteropHelper. The RadWindowInteropHelper is located in the Telerik.Windows.Controls.Navigation namespace.

    Hope this is helpful.

    Regards,
    Vladi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Chetan
    Chetan avatar
    26 posts
    Member since:
    Oct 2012

    Posted 17 Feb 2014 in reply to Vladi Link to this post

    Hi,
    By basic requirement is
    I have touch screen windows 8 Personal computer with WPF application having telerik controls.
    when any input box is touch down by user in application default windows 8 on screen keyboard should get opened
    control : Rad numeric text box
    I have goggled and found some link to achieve same, but not success.
    Please let me know if have any workaround to open touch screen keyboard when user touch the control and text cursor is in it.

    thanks in advance.
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 18 Feb 2014 Link to this post

    Hi,

    There are multiple approaches that could be used in order to open either the on-screen keyboard or the touch specific on-screen keyboard in Windows 8. You could use the TouchDown and LostFocus events of the RadNumericUpDown control in order to open and close the keyboard. All you need to do is find where the TabTip.exe is located on the machine you are using and open it. We tested the scenario on a Windows 8 RT tablet and the file was located at (C:\Program Files\Common Files\Microsoft shared\ink\TabTip.exe). The next code snippets show the described approach:

    <telerik:RadNumericUpDown TouchDown="RadNumericUpDown_TouchDown"
                  LostFocus="RadNumericUpDown_LostFocus"/>

    and in the event handlers:
    private void RadNumericUpDown_TouchDown(object sender, TouchEventArgs e)
    {
        if (File.Exists("C:\\Program Files\\Common Files\\Microsoft shared\\ink\\TabTip.exe"))
        {
            System.Diagnostics.Process.Start("C:\\Program Files\\Common Files\\Microsoft shared\\ink\\TabTip.exe");
        }
    }
     
    private void RadNumericUpDown_LostFocus(object sender, RoutedEventArgs e)
    {
        if (System.Diagnostics.Process.GetProcessesByName("TabTip").Count() > 0)
        {
            System.Diagnostics.Process tabTip = System.Diagnostics.Process.GetProcessesByName("TabTip").First();
            tabTip.Kill();
        }
    }

    Hope this is helpful.

    Regards,
    Vladi
    Telerik
Back to Top