Skip to content

Commit

Permalink
Bump v0.2.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ProJend committed Jul 18, 2021
1 parent 7055096 commit 374fc8f
Show file tree
Hide file tree
Showing 20 changed files with 180 additions and 233 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ For sideloaded packages, more info [here](https://docs.microsoft.com/en-us/windo
- [制作汉堡菜单及添加滑动手势](https://blog.csdn.net/github_36704374/article/details/59580697) - C_Li_
- [Live Tile](https://github.com/LittleFish33/UWPSample) - LittleFish33
- [唤起应用商城,邮件](https://www.cnblogs.com/MzwCat/p/7667702.html) - 5只猫
- [占领标题栏](https://blog.csdn.net/cjh623/article/details/100532431) - dino.c
1 change: 0 additions & 1 deletion True Love/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<ResourceDictionary Source="Template/Colors.xaml"/>
<ResourceDictionary Source="Template/Fonts.xaml"/>
<ResourceDictionary Source="Template/Navigation.xaml"/>
<!--<ResourceDictionary Source="Template/Reveal.xaml"/>-->
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
53 changes: 33 additions & 20 deletions True Love/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
}

if (!Generic.DeviceFamilyMatch(DeviceFamilyList.Mobile)) HideTitleBar();
else HideStatusBarAsync();
else HideStatusBar();
}
}

Expand Down Expand Up @@ -131,44 +131,57 @@ private void HideTitleBar()
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
titleBar.ButtonBackgroundColor = Colors.Transparent;
titleBar.ButtonForegroundColor = Colors.White;

titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
titleBar.ButtonInactiveForegroundColor = Colors.Gray;

titleBar.ButtonHoverBackgroundColor = Colors.PaleTurquoise;
titleBar.ButtonPressedBackgroundColor = Colors.PaleTurquoise;
titleBar.ButtonHoverForegroundColor = Colors.Black;

titleBar.ButtonPressedBackgroundColor = Colors.PaleTurquoise;
titleBar.ButtonPressedForegroundColor = Colors.White;
}

/// <summary>
/// 沉淀状态栏 for Phone
/// </summary>
private async void HideStatusBarAsync()
private void HideStatusBar()
{
var applicationView = ApplicationView.GetForCurrentView();
applicationView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
//applicationView.TryEnterFullScreenMode();

var statusbar = StatusBar.GetForCurrentView();
await statusbar.ShowAsync();
//var statusbar = StatusBar.GetForCurrentView();
//await statusbar.ShowAsync();
//await statusbar.ProgressIndicator.HideAsync();

ApplicationView.GetForCurrentView().VisibleBoundsChanged += (s, e) =>
{
var currentHeight = s.VisibleBounds.Height;
switch (applicationView.Orientation)
{ // 横向
ApplicationView.GetForCurrentView().VisibleBoundsChanged += (s, e) =>
{
var currentHeight = s.VisibleBounds.Height;

switch (applicationView.Orientation)
{ // 横向
case ApplicationViewOrientation.Landscape:
MainPage.Current.LayoutRoot.Margin = new Thickness(0);

break;
MainPage.Current.LayoutRoot.Margin = new Thickness(0);
if (Window.Current.Bounds.Width < 1002)
{
MainPage.Current.NavViewRoot.Margin = new Thickness(48, 0, 48, 0);
MainPage.Current.CommandBar.Margin = new Thickness(0, 0, 48, 0);
}

break;

// 纵向
case ApplicationViewOrientation.Portrait:
if (currentHeight < GenericVariableConverter.oldHeight) MainPage.Current.LayoutRoot.Margin = new Thickness(0, 0, 0, 50);
else if (currentHeight > GenericVariableConverter.oldHeight) MainPage.Current.LayoutRoot.Margin = new Thickness(0);
break;
}
GenericVariableConverter.oldHeight = s.VisibleBounds.Height;
};
if (currentHeight < GenericVariableConverter.oldHeight) MainPage.Current.LayoutRoot.Margin = new Thickness(0, 0, 0, 48);
else if (currentHeight > GenericVariableConverter.oldHeight) MainPage.Current.LayoutRoot.Margin = new Thickness(0);
MainPage.Current.NavViewRoot.Margin = new Thickness(0);
MainPage.Current.CommandBar.Margin = new Thickness(0);
break;
}
GenericVariableConverter.oldHeight = s.VisibleBounds.Height;
};
}
}
}
2 changes: 1 addition & 1 deletion True Love/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="Tim" Publisher="CN=True Love, O=Ben, C=CN" Version="0.2.21.0" />
<Identity Name="Tim" Publisher="CN=True Love, O=Ben, C=CN" Version="0.2.38.0" />
<mp:PhoneIdentity PhoneProductId="cf0148d5-01bb-4b60-b53b-da3346bf8e5e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>True Love - Tim Bergling Foundtion</DisplayName>
Expand Down
89 changes: 32 additions & 57 deletions True Love/Pages/DeviceFamily-Mobile/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:upOS1709="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 5)"
xmlns:upOS1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 7)"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d" x:Name="Main" RequestedTheme="Dark"
Expand Down Expand Up @@ -41,100 +39,79 @@
<Frame x:Name="ContentFrame"/>
</ScrollViewer>

<Grid x:Name="BackgroundOfBar" MinHeight="60"
<Grid x:Name="BackgroundOfBar" MinHeight="65"
VerticalAlignment="Top" HorizontalAlignment="Stretch"
Background="{ThemeResource NavigationViewTopPaneBackground}"
>
<upOS1809:Grid.TranslationTransition>
<Vector3Transition/>
</upOS1809:Grid.TranslationTransition>
Background="{ThemeResource NavigationViewTopPaneBackground}">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" x:Name="AppTitleBar" Background="Transparent"/>
<TextBlock x:Name="NotificationGrid" Height="40" Margin="6 60 0 0" VerticalAlignment="Bottom">
<upOS1809:TextBlock.OpacityTransition>
<ScalarTransition/>
</upOS1809:TextBlock.OpacityTransition>
<Run x:Name="NotificationIcon" FontSize="20"></Run>
<Run Text=" "/>
<TextBlock x:Name="NotificationGrid" Height="40" Margin="9 60 0 0" VerticalAlignment="Bottom">
<Run x:Name="NotificationIcon" FontSize="18"></Run>
<Run Text=" "/>
<Run x:Name="NotificationHint"></Run>
</TextBlock>
</Grid>

<Grid x:Name="BottonBar" VerticalAlignment="Bottom" HorizontalAlignment="Stretch">
<!--<v1809:Grid.TranslationTransition>
<Vector3Transition/>
</v1809:Grid.TranslationTransition>-->
<upOS1809:Grid.OpacityTransition>
<ScalarTransition/>
</upOS1809:Grid.OpacityTransition>
<Grid.Transitions>
<TransitionCollection>
<PaneThemeTransition/>
</TransitionCollection>
</Grid.Transitions>

<CommandBar DefaultLabelPosition="Bottom" upOS1709:ToolTipService.ToolTip="Right tag on here to switch CommandBar."
Background="{ThemeResource NavigationViewTopPaneBackground}"
<CommandBar DefaultLabelPosition="Bottom" Background="{ThemeResource NavigationViewTopPaneBackground}" x:FieldModifier="Public"
RightTapped="CommandBar_RightTapped" x:Name="CommandBar" FlowDirection="LeftToRight" OverflowButtonVisibility="Auto">
<CommandBar.RenderTransform>
<TranslateTransform x:Name="Translate"/>
</CommandBar.RenderTransform>

<!--<AppBarButton Icon="Add" Label="分享故事" Style="{StaticResource AppBarButtonRevealStyle}" ToolTipService.ToolTip="分享你与 Avicii 的故事"/>-->
<AppBarButton x:Name="BackTopButton" IsEnabled="False" Icon="Upload" Label="Back To Top" ToolTipService.ToolTip="Back to top"
<AppBarButton x:Name="BackTopButton" IsEnabled="False" Icon="Upload" Label="Back to Top" ToolTipService.ToolTip="Back to top"
Click="BackToTop_Click" Opacity="{x:Bind OpaqueIfEnabled(BackTopButton.IsEnabled), Mode=OneWay}"
upOS1709:Style="{StaticResource AppBarButtonRevealStyle}">
<upOS1809:AppBarButton.OpacityTransition>
<ScalarTransition/>
</upOS1809:AppBarButton.OpacityTransition>
>
</AppBarButton>
<AppBarButton x:Name="RefreshButton" Icon="Refresh" Label="Refresh" ToolTipService.ToolTip="Refresh dates"
Click="Refresh_Click" Opacity="{x:Bind OpaqueIfEnabled(RefreshButton.IsEnabled), Mode=OneWay}"
IsEnabled="{Binding ElementName=CommentPage,Path=IsSelected}" upOS1709:Style="{StaticResource AppBarButtonRevealStyle}">
<upOS1809:AppBarButton.OpacityTransition>
<ScalarTransition/>
</upOS1809:AppBarButton.OpacityTransition>
IsEnabled="{Binding ElementName=CommentPage,Path=IsSelected}">
</AppBarButton>
<AppBarButton x:Name="CreatComment" Icon="Comment" Label="New Comment" ToolTipService.ToolTip="Share your menory"
Click="CreatComment_Click" Opacity="{x:Bind OpaqueIfEnabled(CreatComment.IsEnabled), Mode=OneWay}"
upOS1709:Style="{StaticResource AppBarButtonRevealStyle}">
<upOS1809:AppBarButton.OpacityTransition>
<ScalarTransition/>
</upOS1809:AppBarButton.OpacityTransition>
Visibility="Collapsed">
</AppBarButton>
<!--<CommandBar.SecondaryCommands>
</CommandBar.SecondaryCommands>-->
</CommandBar>
</Grid>

<muxc:NavigationView x:Name="NavView"
<Grid x:Name="NavViewRoot" x:FieldModifier="Public">
<muxc:NavigationView x:Name="NavView"
Loaded="NavView_Loaded"
BackRequested="NavView_BackRequested"
ItemInvoked="NavView_ItemInvoked"
PaneDisplayMode="Auto"
IsBackButtonVisible="Auto"
IsTitleBarAutoPaddingEnabled="False"
PaneTitle=" I N L O V I N G M E M O R Y"
>
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItemHeader Content="True" x:Name="MainPagesHeader"/>
<muxc:NavigationViewItem Content="Memory" x:Name="HomePage" Icon="Home" Tag="home"/>
<muxc:NavigationViewItem Content="Comments" x:Name="CommentPage" Icon="World" Tag="comment"/>
<muxc:NavigationViewItem Content="Images" x:Name="ImagesPage" Tag="image" Visibility="Visible">
<muxc:NavigationViewItem.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xEB9F;"/>
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
</muxc:NavigationView.MenuItems>
<muxc:NavigationView.FooterMenuItems>
<muxc:NavigationViewItemSeparator x:Name="NavSeparator"/>
<muxc:NavigationViewItem Tag="settings" x:Name="a">
PaneTitle=" I N L O V I N G M E M O R Y">

<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItemHeader Content="True" x:Name="MainPagesHeader"/>
<muxc:NavigationViewItem Content="Memory" x:Name="HomePage" Icon="Home" Tag="home" />
<muxc:NavigationViewItem Content="Comments" x:Name="CommentPage" Icon="World" Tag="comment"/>
<muxc:NavigationViewItem Content="Images" x:Name="ImagesPage" Tag="image" Visibility="Collapsed">
<muxc:NavigationViewItem.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xEB9F;"/>
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
</muxc:NavigationView.MenuItems>
<muxc:NavigationView.FooterMenuItems>
<muxc:NavigationViewItemSeparator x:Name="NavSeparator"/>
<!--<muxc:NavigationViewItem Tag="settings" x:Name="a">
<muxc:NavigationViewItem.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE721;"/>
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
</muxc:NavigationView.FooterMenuItems>
</muxc:NavigationView>
</muxc:NavigationViewItem>-->
</muxc:NavigationView.FooterMenuItems>
</muxc:NavigationView>
</Grid>

<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="NV">
Expand All @@ -147,7 +124,6 @@
<Setter Target="NavView.PaneDisplayMode" Value="Top"/>
<Setter Target="MainPagesHeader.Visibility" Value="Collapsed"/>

<Setter Target="NavView.Margin" Value="50 0 50 0"/>
<Setter Target="BackgroundOfBar.MinHeight" Value="40"/>

<Setter Target="BottonBar.IsTapEnabled" Value="false"/>
Expand All @@ -159,12 +135,11 @@
<VisualState>
<VisualState.StateTriggers>
<AdaptiveTrigger
MinWindowWidth="741"/>
MinWindowWidth="{StaticResource MediumWindowBreakpoint}"/>
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="BottonBar.VerticalAlignment" Value="Top"/>
<Setter Target="BottonBar.HorizontalAlignment" Value="Right"/>
<Setter Target="BottonBar.Margin" Value="0 0 50 0"/>
<Setter Target="CommandBar.Background" Value="Transparent"/>
<Setter Target="CommandBar.Height" Value="40"/>
</VisualState.Setters>
Expand Down
Loading

0 comments on commit 374fc8f

Please sign in to comment.