Windows phone 7 这是windows phone中PhoneTextBox中的错误吗?

Windows phone 7 这是windows phone中PhoneTextBox中的错误吗?,windows-phone-7,textbox,Windows Phone 7,Textbox,在对PhoneTextBox应用样式后,发生了一些奇怪的事情。首先我在其中输入了一些文本,然后我从phonetextbox中删除了文本,但没有失去焦点,然后我再次输入了一些文本,但文本无法显示。但当电话文本框聚焦时,文本再次显示 对这个问题有什么想法吗?谢谢 编辑: 样式定义为: <Style x:Key="PhoneTextBoxStyle" TargetType="toolkit:PhoneTextBox"> <Setter Property="FontFa

在对PhoneTextBox应用样式后,发生了一些奇怪的事情。首先我在其中输入了一些文本,然后我从phonetextbox中删除了文本,但没有失去焦点,然后我再次输入了一些文本,但文本无法显示。但当电话文本框聚焦时,文本再次显示

对这个问题有什么想法吗?谢谢

编辑: 样式定义为:

<Style x:Key="PhoneTextBoxStyle" TargetType="toolkit:PhoneTextBox">
        <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="BorderBrush" Value="White"/>
        <Setter Property="SelectionBackground" Value="{StaticResource PhoneAccentBrush}"/>
        <Setter Property="SelectionForeground" Value="White"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="Padding" Value="{StaticResource PhoneBorderThickness}"/>
        <Setter Property="CaretBrush" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="toolkit:PhoneTextBox">
                    <Grid x:Name="RootGrid" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Disabled">
                                </VisualState>
                                <VisualState x:Name="Enabled">
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="LengthIndicatorBorder">
                            <TextBlock x:Name="LengthIndicator" Foreground="{StaticResource PhoneContrastBackgroundBrush}" FontSize="{StaticResource PhoneFontSizeNormal}" HorizontalAlignment="Right" Margin="0" Opacity="0" TextAlignment="Right" VerticalAlignment="Bottom">
                                    <TextBlock.RenderTransform>
                                        <TranslateTransform/>
                                    </TextBlock.RenderTransform>
                            </TextBlock>
                        </Border>
                        <Border x:Name="HintBorder" BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Background="{TemplateBinding Background}" Margin="0">
                            <Grid>
                                <ContentControl x:Name="HintContent" Background="Transparent" Content="{TemplateBinding Hint}"
                                                HorizontalAlignment="Left" Margin="3,5,3,0" Style="{TemplateBinding HintStyle}" 
                                                Foreground="White"
                                                Visibility="{TemplateBinding ActualHintVisibility}" VerticalAlignment="Top"/>
                                <ContentControl x:Name="ContentElement" BorderThickness="0" HorizontalContentAlignment="Stretch" 
                                                Margin="{StaticResource PhoneTextBoxInnerMargin}" 
                                                Padding="{TemplateBinding Padding}"
                                                VerticalContentAlignment="Stretch"
                                                Foreground="White"/>
                            </Grid>
                        </Border>
                        <Border x:Name="TextBorder" BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Background="Transparent" Margin="0" Visibility="Collapsed">
                            <TextBox x:Name="Text" Foreground="{StaticResource PhoneDisabledBrush}" 
                                     FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" 
                                     FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}"
                                     HorizontalAlignment="Left" SelectionForeground="{TemplateBinding SelectionForeground}" 
                                     SelectionBackground="{TemplateBinding SelectionBackground}" 
                                     TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" 
                                     Text="{TemplateBinding Text}"/>
                        </Border>
                        <Border x:Name="ActionIconBorder" Background="Transparent" HorizontalAlignment="Right" Height="54" VerticalAlignment="Bottom" Width="54">
                            <Image x:Name="ActionIcon" Height="54" Source="{TemplateBinding ActionIcon}" Width="54"/>
                        </Border>
                        <TextBlock x:Name="MeasurementTextBlock" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" IsHitTestVisible="False" Margin="8" Opacity="0" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" Text="{TemplateBinding Text}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


请包括整个问题和您申请的方式。仅链接到其他论坛/网站上的问题不适合使用SO。@Matt Lacey嗨,Matt,谢谢你的提示。我编辑了《魁斯顿》,同一期。清除并输入文本将更改前景色。根据主题(暗/光)的不同,情况会有所不同。没有时间调查。请包括整个问题和你正在应用的风格。仅链接到其他论坛/网站上的问题不适合使用SO。@Matt Lacey嗨,Matt,谢谢你的提示。我编辑了《魁斯顿》,同一期。清除并输入文本将更改前景色。根据主题(暗/光)的不同,情况会有所不同。没有时间调查。