This is a migrated thread and some comments may be shown as answers.
equivalent for ystem.Windows.Automation.AutomationElement
3 Answers 22 Views
This is a migrated thread and some comments may be shown as answers.
Chetan
Top achievements
Rank 1
Chetan asked on 28 Jan 2014, 06:13 AM
 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

3 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 30 Jan 2014, 09:33 AM
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 >>
0
Chetan
Top achievements
Rank 1
answered on 17 Feb 2014, 10:00 AM
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.
0
Vladi
Telerik team
answered on 18 Feb 2014, 01:40 PM
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
Asked by
Chetan
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Chetan
Top achievements
Rank 1
Share this question
or