本文介绍了applicationbar / appbar with textfield的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,

我目前正在尝试开发一款Windows手机8简单浏览器,类似于实践。 (因为ie没有方向锁定。)

I am currently trying to develop a windows phone 8 simple browser similar to ie as a practice. (because ie does not have orientation lock).

我的问题是:

我该怎么办?制作一个appbar / applicationbar,其上有一个类似于ie10的文本字段?

how can I make an appbar/applicationbar with a textfield on it similar to ie10?

我找到了这个链接
http://msdn.microsoft.com/en-us/library/windows/apps/hh780658.aspx
,但似乎是javascript。

I found this link http://msdn.microsoft.com/en-us/library/windows/apps/hh780658.aspx, but it seems that it is for javascript.

我目前正在使用c#xaml应用程序。

I am currently using c# xaml application.

推荐答案

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="100" />
        </Grid.RowDefinitions>

              <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
            <TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

        </Grid>
        
        <Grid x:Name="MyAppBar" Grid.Row="2" Margin="12,0,12,0">
            <TextBox></TextBox>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>


这篇关于applicationbar / appbar with textfield的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 13:59