Skip to content

Commit

Permalink
修正布局问题,添加标题栏按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Oct 16, 2016
1 parent 2f2c0c2 commit 6c81c9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions bilibili2/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
<Button Grid.Column="1" x:Name="btn_refresh" Style="{ThemeResource TitleBarRefreshButtonTheme}" Width="48" Height="32" Background="{ThemeResource Bili-ForeColor}"/>
<Button Grid.Column="2" x:Name="btn_search" Style="{ThemeResource TitleBarSearchButtonTheme}" Width="48" Height="32" Background="{ThemeResource Bili-ForeColor}"/>
</Grid>
<SplitView x:Name="sp_View" Grid.Row="1" OpenPaneLength="200" PaneBackground="{ThemeResource Bili-MenuBack}" DisplayMode="Overlay" PaneClosed="sp_View_PaneClosed" >
<SplitView x:Name="sp_View" Grid.Row="2" OpenPaneLength="200" PaneBackground="{ThemeResource Bili-MenuBack}" DisplayMode="Overlay" PaneClosed="sp_View_PaneClosed" >
<SplitView.Pane>
<Grid >
<Grid.RowDefinitions>
Expand Down Expand Up @@ -1149,22 +1149,22 @@
Width="20" Opacity="0" Background="White" HorizontalAlignment="Left"/>
</Grid>
</SplitView>
<Border x:Name="grid_GG" Visibility="Collapsed" Height="auto" Grid.RowSpan="2" VerticalAlignment="Bottom" CornerRadius="10" HorizontalAlignment="Center" Background="#7F000000" Margin="0,30">
<Border Grid.Row="1" x:Name="grid_GG" Visibility="Collapsed" Height="auto" Grid.RowSpan="2" VerticalAlignment="Bottom" CornerRadius="10" HorizontalAlignment="Center" Background="#7F000000" Margin="0,30">
<TextBlock x:Name="txt_GG" Foreground="White" VerticalAlignment="Center" Margin="10,5">
<Run Text="信息不能为空"/>
</TextBlock>
</Border>
<Grid Grid.Row="1" Width="48" Height="48" VerticalAlignment="Top" HorizontalAlignment="Left">
<Grid Grid.Row="2" Width="48" Height="48" VerticalAlignment="Top" HorizontalAlignment="Left">
<Ellipse x:Name="menu_bor_HasMessage" Visibility="Collapsed" HorizontalAlignment="Right" Margin="5 15" Fill="Red" Width="5" Height="5" VerticalAlignment="Top"/>
</Grid>
<AppBarButton x:Name="btn_OpenMenu" Grid.Row="1" Width="48" Height="48" Foreground="White" Click="btn_OpenMenu_Click">
<AppBarButton Grid.Row="2" x:Name="btn_OpenMenu" Width="48" Height="48" Foreground="White" Click="btn_OpenMenu_Click">
<AppBarButton.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE700;" />
</AppBarButton.Icon>
</AppBarButton>


<Frame x:Name="infoFrame" Grid.RowSpan="2" Visibility="Visible" Navigating="infoFrame_Navigating" Navigated="infoFrame_Navigated" >
<Frame Grid.Row="1" x:Name="infoFrame" Grid.RowSpan="2" Visibility="Visible" Navigating="infoFrame_Navigating" Navigated="infoFrame_Navigated" >
<Frame.Resources>
<Storyboard x:Name="storyboardPopOut" >
<DoubleAnimation x:Name="tuic" From="0" Duration="00:00:0.1" Completed="StoryboardPopOut_Completed"
Expand Down
3 changes: 0 additions & 3 deletions bilibili2/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1372,12 +1372,9 @@ private void ChangeTitbarColor()
//电脑标题栏颜色
var titleBar = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().TitleBar;
titleBar.BackgroundColor = ((SolidColorBrush)top_grid.Background).Color;
titleBar.ForegroundColor = Color.FromArgb(255, 254, 254, 254);//Colors.White纯白用不了。。。
titleBar.ButtonHoverBackgroundColor = ((SolidColorBrush)menu_DarkBack.Background).Color;
titleBar.ButtonBackgroundColor = ((SolidColorBrush)top_grid.Background).Color;
titleBar.ButtonForegroundColor = Color.FromArgb(255, 254, 254, 254);
titleBar.ButtonPressedBackgroundColor = Colors.WhiteSmoke;
titleBar.ButtonPressedForegroundColor = Color.FromArgb(255, 254, 254, 254);
titleBar.InactiveBackgroundColor = ((SolidColorBrush)top_grid.Background).Color;
titleBar.ButtonInactiveBackgroundColor = ((SolidColorBrush)top_grid.Background).Color;
infoFrame.Tag = (SolidColorBrush)top_grid.Background;
Expand Down

0 comments on commit 6c81c9a

Please sign in to comment.