如何在枢轴项目中添加点按控件? [英] How to add tap control in pivote items?

查看:101
本文介绍了如何在枢轴项目中添加点按控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有两个项目tap1和tap2的旋转控制器。
< controls:Pivot Height =" 574"的Horizo​​ntalAlignment = QUOT;左"余量= QUOT; 12,27,0,0"名称= QUOT; pivot1"标题= QUOT;" VerticalAlignment = QUOT;陀螺" Width =" 444">

                < controls:PivotItem Header =" Tab 1">



           &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; <网格和GT;

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP; < Image Height =" 150"的Horizo​​ntalAlignment = QUOT;左"余量= QUOT; 103,101,0,0"名称= QUOT; image1的"
Stretch =" Fill" VerticalAlignment = QUOT;陀螺"宽度= QUOT; 200"源= QUOT;缩略图/ 1.jpeg" />

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < / Grid>&
                < / controls:PivotItem>&
                <对照:PivotItem部首=]分页2英寸;>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP; <网格和GT;

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP; < Image Height =" 150"的Horizo​​ntalAlignment = QUOT;左"余量= QUOT; 103,101,0,0"名称= QUOT; IMAGE2"
Stretch =" Fill" VerticalAlignment = QUOT;陀螺"宽度= QUOT; 200"源= QUOT;缩略图/ 2.jpeg" />

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < / Grid>&
                < /控制:PivotItem>

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < / controls:Pivot>
$


当我滑动时显示正确的图像。

但是当我点击它时它想要什么选项卡1然后第二张图像应该可见

如何删除滑动效果并添加标签效果?

         ;&NBSP;  

解决方案

你不能。 该控件的设计与其工作原理完全相同。


或者,您可以设计自己的XAML,以便在点击选项卡时隐藏和显示对象。 我不知道有任何示例向您展示如何使用Tab控件(因为它不是Windows Phone的标准UI控件),但它应该是简单的


I am usingpivot control with two items tap1 and tap2
<controls:Pivot Height="574" HorizontalAlignment="Left" Margin="12,27,0,0" Name="pivot1" Title="" VerticalAlignment="Top" Width="444">
                <controls:PivotItem Header="Tab 1">

                    <Grid>
                        <Image Height="150" HorizontalAlignment="Left" Margin="103,101,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="200" Source="Thumbnails/1.jpeg" />
                    </Grid>
                </controls:PivotItem>
                <controls:PivotItem Header="Tab 2">
                    <Grid>
                        <Image Height="150" HorizontalAlignment="Left" Margin="103,101,0,0" Name="image2" Stretch="Fill" VerticalAlignment="Top" Width="200" Source="Thumbnails/2.jpeg" />
                    </Grid>
                </controls:PivotItem>
                         </controls:Pivot>

It is showing me proper image when i slide.
But What it Want it when i tap on tab 1 then 2 nd image should be visible
how to remove sliding effect and add tab effect?
           

解决方案

You cannot.  That control is designed to work exactly as it is working.

Alternatively you could design your own XAML to hide and show objects as you tap on the tabs.  I don't know of any example that shows you how to do this with Tab controls (because it isn't a standard UI control for Windows Phone) but it should be simple for you.


这篇关于如何在枢轴项目中添加点按控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆