2016-10-25 27 views
1

那條白線 that white line它被選中的狀態被刪除了嗎?

我想將它分開但是成爲問題。如何把堆疊面板top.F在HamburgerButtonInfo,每一次點擊,整個HamburgerButtonInfo 的StackPanel選擇了漢堡菜單上,如何刪除選定的整體效果?

<Page 
    x:Class="心理FM.Views.Shell" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     xmlns:Controls="using:Template10.Controls" 
     xmlns:Core="using:Microsoft.Xaml.Interactions.Core" 
     xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" 
     xmlns:behaviors="using:Template10.Behaviors" 
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
     xmlns:local="using:心理FM.Views" 
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:views="using:心理FM.Views" 
     Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" 
     mc:Ignorable="d"> 
    <Controls:HamburgerMenu x:Name="MyHamburgerMenu" 
          > 
     <Controls:HamburgerMenu.PrimaryButtons> 
      <!--頭像,簽到--> 
      <Controls:HamburgerButtonInfo > 
       <StackPanel Orientation="Horizontal" Width="400" Height="150"> 
        <StackPanel.Background> 
         <ImageBrush ImageSource="../Assets/04.jpg"></ImageBrush> 
        </StackPanel.Background> 
        <Ellipse Height="70" Width="70" Margin="10,60,0,10"> 
         <Ellipse.Fill> 
           <ImageBrush ImageSource="../Assets/IMG_0003.JPG" /> 
         </Ellipse.Fill> 
        </Ellipse> 
        <StackPanel VerticalAlignment="Center" Margin="10,45,0,0"> 
         <TextBlock Name="UserName" Text="user" FontSize="20" VerticalAlignment="Center"/> 
         <TextBlock Name="Count" Text="null" FontSize="20" VerticalAlignment="Center"/> 
        </StackPanel> 
        <Button Name="SignBtn" Content="簽到" HorizontalAlignment="" VerticalAlignment="Bottom"></Button> 

       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <Controls:HamburgerButtonInfo ClearHistory="True"> 
       <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> 
        <Image Source="../Assets/"></Image> 
        <TextBlock Text="我關注的" Margin="12, 0, 0, 0" VerticalAlignment="Center" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <Controls:HamburgerButtonInfo ClearHistory="True"> 
       <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> 
        <Image Source="../Assets/"></Image> 
        <TextBlock Text="我的下載" Margin="12, 0, 0, 0" VerticalAlignment="Center" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <Controls:HamburgerButtonInfo ClearHistory="True"> 
       <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> 
        <Image Source="../Assets/"></Image> 
        <TextBlock Text="我的話題" Margin="12, 0, 0, 0" VerticalAlignment="Center" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <Controls:HamburgerButtonInfo ClearHistory="True"> 
       <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> 
        <Image Source="../Assets/"></Image> 
        <TextBlock Text="定時關閉" Margin="12, 0, 0, 0" VerticalAlignment="Center" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <Controls:HamburgerButtonInfo ClearHistory="True"> 
       <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> 
        <Image Source="../Assets/"></Image> 
        <TextBlock Text="通知" Margin="12, 0, 0, 0" VerticalAlignment="Center" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <Controls:HamburgerButtonInfo ClearHistory="True"> 
       <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> 
        <Image Source="../Assets/"></Image> 
        <TextBlock Text="私信" Margin="12, 0, 0, 0" VerticalAlignment="Center" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
     </Controls:HamburgerMenu.PrimaryButtons> 

     <Controls:HamburgerMenu.SecondaryButtons> 
      <!-- profile button --> 
      <Controls:HamburgerButtonInfo ButtonType="Command"> 
       <Interactivity:Interaction.Behaviors> 
        <Core:EventTriggerBehavior EventName="Tapped"> 
         <behaviors:MessageDialogAction Title="Show profile" Content="This is an example of a Command-type hamburger button. It does not navigate, only raises the Tapped event for some custom implementation." /> 
        </Core:EventTriggerBehavior> 
       </Interactivity:Interaction.Behaviors> 
       <StackPanel Orientation="Horizontal"> 
        <ToolTipService.ToolTip> 
         <TextBlock MaxWidth="225" 
            Text="This is the tooltip for the Show Profile command button. Remember to localize." 
            TextWrapping="Wrap" /> 
        </ToolTipService.ToolTip> 
        <SymbolIcon Width="48" 
           Height="48" 
           Symbol="Contact" /> 
        <TextBlock Margin="12,0,0,0" 
           VerticalAlignment="Center" 
           Text="User profile" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
      <!-- settingspage button --> 
      <Controls:HamburgerButtonInfo x:Name="SettingsButton" 
              PageParameter="0" 
              PageType="views:SettingsPage"> 
       <Controls:HamburgerButtonInfo.NavigationTransitionInfo> 
        <SuppressNavigationTransitionInfo /> 
       </Controls:HamburgerButtonInfo.NavigationTransitionInfo> 
       <StackPanel Orientation="Horizontal"> 
        <SymbolIcon Width="48" 
           Height="48" 
           Symbol="Setting" /> 
        <TextBlock Margin="12,0,0,0" 
           VerticalAlignment="Center" 
           Text="Settings" /> 
       </StackPanel> 
      </Controls:HamburgerButtonInfo> 
     </Controls:HamburgerMenu.SecondaryButtons> 

    </Controls:HamburgerMenu> 
</Page> 
+0

所以,你想阻止HamburgerButtonInfo被接受的選擇? – Ivan

+0

是的,在template10中,hamburgerButtonInfo像一個按鈕,我想在SplitView.Pane中使用堆棧面板, – Lev2048

+0

它可以做什麼?沒有顯示.. – Lev2048

回答

3

你可以簡單的設置ButtonTypeLiteral在你的第一個Controls:HamburgerButtonInfo

HamburgerButton有三種類型:Command,Toggle和Literal,默認情況下它是「切換」,您可以更改此屬性以查看差異。

總之,在這種情況下,你可以修改你這樣的代碼:

<Controls:HamburgerButtonInfo ButtonType="Literal"> 
    <StackPanel Orientation="Horizontal" Width="400" Height="150"> 
     <StackPanel.Background> 
      <ImageBrush ImageSource="../Assets/04.jpg"></ImageBrush> 
     </StackPanel.Background> 
     <Ellipse Height="70" Width="70" Margin="10,60,0,10"> 
      <Ellipse.Fill> 
       <ImageBrush ImageSource="../Assets/IMG_0003.JPG" /> 
      </Ellipse.Fill> 
     </Ellipse> 
     <StackPanel VerticalAlignment="Center" Margin="10,45,0,0"> 
      <TextBlock Name="UserName" Text="user" FontSize="20" VerticalAlignment="Center"/> 
      <TextBlock Name="Count" Text="null" FontSize="20" VerticalAlignment="Center"/> 
     </StackPanel> 
     <Button Name="SignBtn" Content="簽到" HorizontalAlignment="" VerticalAlignment="Bottom"></Button> 

    </StackPanel> 
</Controls:HamburgerButtonInfo> 
+0

非常感謝!... – Lev2048

相關問題