locked
why textbox can be dragged?!

    Question

  • Hello,

    I developed a win8 app store game(directx), and I used a textbox for user to input user name and other stuff, the textbox's margin is changed at runtime using c++.

    The problem is  textbox can be dragged up and down, this is not what I wanted. So is there some way to resolve this? 

    <Page
        x:Class="WinAppXaml.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        d:DesignWidth="1366"
        d:DesignHeight="768">
    
        <SwapChainBackgroundPanel x:Name="DXSwapChainPanel">
            
            
            <!-- TextBox, used to handle input text -->
            <Grid x:Name="TextBox_Grid" Grid.Row="0" Grid.Column="0"  Visibility="Collapsed">
                <TextBox x:Name="TextBox" 
                     IsReadOnly="False" 
                     HorizontalAlignment="Left"
                     VerticalAlignment="Top"
                     Margin="0,0,0,0" 
                     Height="35" 
                     Width="200" 
                     AcceptsReturn="False"
                     KeyUp="OnTextBoxKeyUp"
                     DragOver="OnTextBoxDragOver"
                     AllowDrop="False"
                     ManipulationMode="None"
                     />
            </Grid>   
        </SwapChainBackgroundPanel>
    </Page>

    Thursday, April 11, 2013 3:10 AM

Answers