So I’m testing a few things out with Windows Phone 7 and I’m having this really weird bug where a textbox inside a UserControl doesn’t bring up the SIP when I set it as the focus. Outside the UserControl on the MainPage, textboxes work just fine and selecting it brings up the keyboard but when the textbox is inside the usercontrol, nothing. I’ve even tried to workaround it by setting the MouseLeftButtonDown event on textbox call a method that calls Focus() on the textbox directly and still nothing. Am I doing something wrong or is this a bug with WP7 emulator?
XAML Code for the control:
<UserControl x:Class="WindowsPhoneClient.SearchPage"
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"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:Controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
d:DesignWidth="480" d:DesignHeight="696" xmlns:my="clr-namespace:WindowsPhoneClient">
<Grid x:Name="LayoutRoot">
<TextBox></TextBox>
</Grid>
I figured out my problem, on my main page I was trying to use
But SearchPage was a UserControl and not a PhoneApplicationPage so that was the problem. I wasn’t aware that a Page and a UserControl were different, silly me. >_<