locked
Do Not Want To display Virtual Keyboard On TextBox Focus in Metro application using xaml and VB

    Question

  • I do not want to display Virtual KeyBoard when textbox get focused. How to prevent this?I am using following xaml.

    But it gives en error named ---

    Error 1 "Unknown member 'PreventKeyboardDisplayOnProgrammaticFocus' on element 'TextBox' "

    <TextBox x:Name="txtSku"  VerticalAlignment="Center" HorizontalAlignment="Left" MinHeight="25" TextWrapping="Wrap" Height="19" Margin="0,2.5,-137,4" Grid.ColumnSpan="4" Width="201" Background="White" FontSize="12" InputScope="Number" IsTextPredictionEnabled="False" IsSpellCheckEnabled="False" PreventKeyboardDisplayOnProgrammaticFocus="True"></TextBox>

    Friday, March 21, 2014 7:23 AM

Answers

  • Are you sure you're writing a Windows 8.1 app?

    Your code snippet works fine for me in a Windows 8.1 app. As expected, I get the same error you mention in a Windows 8 app.

    If you are using a non-express version of Visual Studio 2013 it should say (Windows 8.1) next to the project name in VS 2013's Solution pane. If you are using VS2013 Express for Windows then it supports only Windows 8.1 apps. If you are using Visual Studio 2012 then that doesn't support Windows 8.1 apps, only Windows 8 apps (which run on Windows 8.1, but don't get to use new features like this one).

    --Rob


    Friday, March 21, 2014 7:32 PM
    Owner
  • Windows 8 apps (written with VS2012 or VS2013 non-Express versions) will run on Windows 8 and Windows 8.1, but will have access only to Windows 8 API.

    Windows 8.1 apps (written with VS2013) will run only on Windows 8.1 and will have access to the Windows 8.1 functionality.

    If you to run on Windows 8 then you need a Windows 8 app. If you need the Windows 8.1 functionality then you need a Windows 8.1 app. You may want to have two versions: a Windows 8.1 app which uses the Windows 8.1 functionality and a Windows 8 app which doesn't use the new features but which runs on Windows 8.

    --Rob

    Monday, March 31, 2014 6:46 PM
    Owner

All replies

  • Are you writing a Windows 8 app or a Windows 8.1 app? PreventKeyboardDisplayOnProgrammaticFocus is new for Windows 8.1
    Friday, March 21, 2014 7:28 AM
    Owner
  • I am developing application for windows 8.1.


    I went through the link which you mentioned above. I did the same thing as I have posted my Xaml in my question.
    Friday, March 21, 2014 9:00 AM
  • Are you sure you're writing a Windows 8.1 app?

    Your code snippet works fine for me in a Windows 8.1 app. As expected, I get the same error you mention in a Windows 8 app.

    If you are using a non-express version of Visual Studio 2013 it should say (Windows 8.1) next to the project name in VS 2013's Solution pane. If you are using VS2013 Express for Windows then it supports only Windows 8.1 apps. If you are using Visual Studio 2012 then that doesn't support Windows 8.1 apps, only Windows 8 apps (which run on Windows 8.1, but don't get to use new features like this one).

    --Rob


    Friday, March 21, 2014 7:32 PM
    Owner
  • Thank you so much for such a informative and quick reply.

    You mean that if I am developing metro app in VS2012 then it will run on windows 8 and 8.1. But it doesn't support new feature like this one in 8.1.

    I need to develop such app which run under both 8 and 8.1.For that ,I need to develop with VS 2013(non-express edition) which will run under both 8 and 8.1.Am I right?

    If so then is there any workaround in VS 2012 for preventing Key Board Display on Text Box Focus using custom keyboard or any other alternate way?


    Saturday, March 22, 2014 5:49 AM
  • Windows 8 apps (written with VS2012 or VS2013 non-Express versions) will run on Windows 8 and Windows 8.1, but will have access only to Windows 8 API.

    Windows 8.1 apps (written with VS2013) will run only on Windows 8.1 and will have access to the Windows 8.1 functionality.

    If you to run on Windows 8 then you need a Windows 8 app. If you need the Windows 8.1 functionality then you need a Windows 8.1 app. You may want to have two versions: a Windows 8.1 app which uses the Windows 8.1 functionality and a Windows 8 app which doesn't use the new features but which runs on Windows 8.

    --Rob

    Monday, March 31, 2014 6:46 PM
    Owner