1

我有一个以 ComponentOne 富文本框作为主要内容元素的 C# Windows Phone 应用程序。如果文本框中有足够的文本,当虚拟键盘卷起时,其中一些文本会滚动到视图之外,则文本框会缩小大小,而不是暂时地、永久地缩小。我根本没有任何 sizechanged 事件处理程序或类似的东西。请注意,如果富文本框中的文本量不会导致出现虚拟键盘时任何文本被垂直推离屏幕,则不会出现此问题。

这是页面的 XAML:

<phone:PhoneApplicationPage
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:SpeechRecoControl="clr-namespace:SpeechRecoControl.Controls;assembly=SpeechRecoControl_WP8" 
            xmlns:RichTextBox="clr-namespace:C1.Phone.RichTextBox;assembly=C1.Phone.RichTextBox.8"
            xmlns:UserControls="clr-namespace:VoiceEditBox_WP8.UserControls;assembly=VoiceEditBox_WP8" x:Name="rootFrame"
            x:Class="SuperNote.Pages.NoteEntry"
            FontFamily="{StaticResource PhoneFontFamilyNormal}"
            FontSize="{StaticResource PhoneFontSizeNormal}"
            Foreground="{StaticResource PhoneForegroundBrush}"
            SupportedOrientations="Portrait" Orientation="Portrait"
            mc:Ignorable="d"
            shell:SystemTray.IsVisible="True"
            DataContext="{Binding Source={StaticResource Locator}, Path=Main}"    
            >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--TitlePanel contains the name of the application and page title-->

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Margin="12,0,12,0">
            <UserControls:VoiceEditBox x:Name="vebNote"  />
        </Grid>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar x:Name="appbarMain" IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="btnUndo" IconUri="/Assets/Images/Icons/Command-Undo.png" Text="Undo" Click="btnUndo_Click"  />
            <shell:ApplicationBarIconButton x:Name="btnRedo" IconUri="/Assets/Images/Icons/Command-Redo.png" Text="Redo" Click="btnRedo_Click" />
            <shell:ApplicationBarIconButton x:Name="btnMicrophone" IconUri="/Assets/Images/Icons/turn-microphone-on.png" Text="Turn Mic On" Click="btnMicrophone_Click"/>
            <shell:ApplicationBarIconButton x:Name="btnSelection" IconUri="/Assets/Images/Icons/Text-Normal.png" Text="Select" Click="btnSelection_Click"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuitemAttachPhoto" Text="Attach Photo" Click="menuitemAttachPhoto_Click"/>
                <shell:ApplicationBarMenuItem x:Name="menuitemViewAttachments" Text="View Attachments" Click="menuitemViewAttachments_Click" />
                <shell:ApplicationBarMenuItem x:Name="menuitemHelp" Text="Help"/>
                <shell:ApplicationBarMenuItem x:Name="menuitemTest" Text="Test" Click="menuitemTest_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage
4

0 回答 0