win10 uwp 装机必备应用 含源代码
来源:互联网 发布:曲阜网络问政 编辑:程序博客网 时间:2024/06/06 07:17
zhxilin大神说http://www.cnblogs.com/zhxilin/p/4819372.html这文章说到了使用await Windows.System.Launcher.LaunchUriAsync(new Uri(uri));
打开应用商店
我想到了装机必备的一个软件
大概界面
求轻喷
我设计了MainPage.xaml拥有两个Frame
单例model
从https://www.microsoft.com/zh-cn/store/top-free/apps/pc得到软件图片
Button可以设置Content为Grid
<Button.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image Source="ms-appx:///Assets/QQ.png" Grid.Row="0" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> <TextBlock Text="搜狐视频" Grid.Row="1" HorizontalAlignment="Center" /> </Grid> </Button.Content> </Button>
button设置大小和图片一样,就可以把图片填到button作为按钮
右击获得应用软件QQ的ProductId,
ProductId是点击链接最后的
9wzdncrfj1ps
使用
string uri = "ms-windows-store://pdp/?ProductId=9wzdncrfj1ps"; await Windows.System.Launcher.LaunchUriAsync(new Uri(uri));
在按钮写<Button Click="QQ_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0"/>
就可以点击跳转应用商店
在页面跳转到QQ页面chatcommunicationframe.Navigate(typeof(chatcommunication));
因为
string uri = "ms-windows-store://pdp/?ProductId=9wzdncrfj1ps"; await Windows.System.Launcher.LaunchUriAsync(new Uri(uri));
在每次打开应用都使用,放在model
public async void windowsapp(string ProductId) { string uri = $"ms-windows-store://pdp/?ProductId={ProductId}"; await Windows.System.Launcher.LaunchUriAsync(new Uri(uri)); }
可以使用
private void souhu_Click(object sender , RoutedEventArgs e) { string ProductId = "9wzdncrfhvq0"; _model.windowsapp(ProductId); }
view:
chatcommunication.xaml
movie.xaml
model.cs
MainPage.xaml
<Page x:Class="classifyapp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:classifyapp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Frame Name="chatcommunicationframe" Grid.Row="0" Margin="10,10,10,10"/> <Frame Name="movieframe" Grid.Row="1" Margin="10,10,10,10"/> </Grid></Page>
chatcommunication.xaml:
<Page x:Class="classifyapp.view.chatcommunication" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:classifyapp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Border> <Border.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF6369EB" Offset="0"/> <GradientStop Color="#FFFAFBFF" Offset="1"/> </LinearGradientBrush> </Border.Background> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Text="聊天" Grid.Row="0" Margin="10,10,10,10"/> <Grid Grid.Row="1"> <GridView > <Button Click="QQ_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0"> <Button.Content> <Image Source="ms-appx:///Assets/QQ.png" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> </Button.Content> </Button> </GridView> </Grid> </Grid> </Border> </Grid></Page>
movie.xaml
<Page x:Class="classifyapp.view.movie" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:classifyapp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Border> <Border.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF6369EB" Offset="0"/> <GradientStop Color="#FFFAFBFF" Offset="1"/> </LinearGradientBrush> </Border.Background> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Text="视频" Grid.Row="0" Margin="10,10,10,10"/> <Grid Grid.Row="1"> <GridView > <Button Click="souhu_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0" > <Button.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image Source="ms-appx:///Assets/搜狐.png" Grid.Row="0" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> <TextBlock Text="搜狐视频" Grid.Row="1" HorizontalAlignment="Center" /> </Grid> </Button.Content> </Button> <Button Click="blibli_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0"> <Button.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image Source="ms-appx:///Assets/blibli.png" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> <TextBlock Text="搜狐视频" Grid.Row="1" HorizontalAlignment="Center" /> </Grid> </Button.Content> </Button> <Button Click="manguo_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0"> <Button.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image Source="ms-appx:///Assets/芒果.png" Width="50" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> <TextBlock Text="芒果TV" Grid.Row="1" HorizontalAlignment="Center" /> </Grid> </Button.Content> </Button> <Button Click="youku_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0"> <Button.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image Source="ms-appx:///Assets/优酷.png" Width="50" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> <TextBlock Text="优酷TV" Grid.Row="1" HorizontalAlignment="Center" /> </Grid> </Button.Content> </Button> <Button Click="baofengyingyin_Click" Width="50" Height="50" Margin="10,10,10,10" Padding="0"> <Button.Content> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <Image Source="ms-appx:///Assets/暴风影音.png" Width="50" ScrollViewer.VerticalScrollBarVisibility="Disabled" /> <TextBlock Text="暴风影音" Grid.Row="1" HorizontalAlignment="Center" /> </Grid> </Button.Content> </Button> </GridView> </Grid> </Grid> </Border> </Grid></Page>
没有使用比较多的东西,简单单例,按钮,frame,GridView,没有使用bind,动画
margin可以使用”10”,我都是使用”10,10,10,10”,虽然好多写法可以简单,让代码变少,也不会容易出错,但是没有那么多,只是做一个看到的想到的好的东西,虽然这个应该发布是不会的,但是也有一些想不开的也许就发出来,有人想要。不过这样只是在博客可以这样说,实际的软件这样开发,根本做不到,因为没有那么多人都知道我的想法,知道了也不会开发出来,除了技术还有的是做出来是他想的。
也没有那些跳转出来的,好看的,我设计看起来没有一点好,本来想做一个好看的天蓝,最后成了上面的那个
需要的技术很少
做出来可以是一个装机必备,不知有谁想到这么简单技术做出的,可以卖软件,不知道有谁要,挂个价格100
代码:https://code.csdn.net/lindexi_gd/lindexi_gd/tree/master/classifyapp
参考:https://msdn.microsoft.com/en-us/library/windows/apps/mt228343.aspx
- win10 uwp 装机必备应用 含源代码
- win10 UWP Markdown 含源代码
- win10 UWP 应用设置
- Win10 UWP应用发布流程
- 【UWP开发】如何通过unity发布win10 uwp应用
- win10应用 UWP 使用MD5算法
- win10 uwp 应用转后台清理内存
- 【广告】win10 uwp 水印图床 含代码
- 装机必备
- win10 uwp App-to-app communication 应用通信
- win10 uwp 打包第三方字体到应用
- win10 uwp应用开发(JS)——wifi扫描连接
- 【UWP开发】如何将win10 UWP应用安装部署到xbox one
- win10 UWP读写文件
- Win10/UWP开发-Ink
- win10 uwp 通知Toast
- win10 UWP 显示地图
- win10 uwp 参考
- static的作用
- ORA-12514: TNS:listener does not currently know of service requested in connect
- TFS代码管理器的配置
- Java基础——Java笔记——Java开发工具Eclipse的使用
- hdu 5573 Binary Tree(构造)
- win10 uwp 装机必备应用 含源代码
- 类图
- eclipse使用maven,启动工程tomcat报错:java.lang.ClassNotFoundException: org.springframework.web.context.Contex
- 京东咚咚架构演进
- hdu 5578 Friendship of Frog(水)
- Linux异步通知
- 测试百度云平台BAE的mysql服务
- Gradle简介与安装
- Android之发送短信后按钮(60秒)变灰色每隔一秒递减显示