none
关于Thumb控件的使用; RRS feed

答案

  • 你好,

    同样很简单,只需要给Thumb附加一个Flyout就行了。

    <Thumb Height="100" Width="100" Tapped="Thumb_Tapped">
                <FlyoutBase.AttachedFlyout>
                    <Flyout>
                        <StackPanel>
                            <Button Content="menu1"></Button>
                            <Button Content="menu2"></Button>
                            <Button Content="menu3"></Button>
                            <Button Content="menu4"></Button>
                        </StackPanel>
                    </Flyout>
                </FlyoutBase.AttachedFlyout>
            </Thumb>
    private void Thumb_Tapped(object sender, TappedRoutedEventArgs e)
            {
                FrameworkElement senderElement = sender as FrameworkElement;
                FlyoutBase flyoutBase = FlyoutBase.GetAttachedFlyout(senderElement);
                flyoutBase.ShowAt(senderElement);
            }



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • 已标记为答案 learn WP 2017年9月29日 6:21
    2017年9月28日 9:15

全部回复

  • 您好,

    这个加号你可以用自定义按钮去实现,去编辑按钮的模板让他看起来是圆的,并且半透明,

    当你点击按钮时,你可以弹出一个Flyout,在Flyout里面放几个自定义按钮。


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2017年9月28日 1:38
  • 我用的是Thumb控件,

    想实现成单击后,出现第二张图的情况,出现一列按钮

    2017年9月28日 1:58
  • 你好,

    同样很简单,只需要给Thumb附加一个Flyout就行了。

    <Thumb Height="100" Width="100" Tapped="Thumb_Tapped">
                <FlyoutBase.AttachedFlyout>
                    <Flyout>
                        <StackPanel>
                            <Button Content="menu1"></Button>
                            <Button Content="menu2"></Button>
                            <Button Content="menu3"></Button>
                            <Button Content="menu4"></Button>
                        </StackPanel>
                    </Flyout>
                </FlyoutBase.AttachedFlyout>
            </Thumb>
    private void Thumb_Tapped(object sender, TappedRoutedEventArgs e)
            {
                FrameworkElement senderElement = sender as FrameworkElement;
                FlyoutBase flyoutBase = FlyoutBase.GetAttachedFlyout(senderElement);
                flyoutBase.ShowAt(senderElement);
            }



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • 已标记为答案 learn WP 2017年9月29日 6:21
    2017年9月28日 9:15
  • 谢谢,但是Flyout的浮窗的位置如何改变,我设置<Flyout Placement="Right">

    没什么作用,一直在屏幕最上方,不能在thumb控件上边或右边


    • 已编辑 learn WP 2017年9月29日 6:55
    2017年9月29日 6:21


  • 2017年9月29日 7:39