设为首页 加入收藏

TOP

WP、Win10开发或者WPF开发时绘制自定义窗体~例如:一个手机(一)
2017-10-11 16:06:10 】 浏览:7506
Tags:Win10 开发 或者 WPF 绘制 定义 窗体 例如 一个手机

WP and Win10

效果:(数字是参考值,和UI无关)

<Page
    x:Class="_05.AllControls._BorderUsePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:_05.AllControls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <!--快乐玩耍:DIV一个手机-->
    <Grid>
        <!--手机整体-->
        <Border BorderBrush="Green" 
                BorderThickness="4"
                CornerRadius="10,10,10,10">
            <Grid>
                <!--主屏幕-->
                <Border BorderBrush="Gray" 
                BorderThickness="2"
                Margin="10,60,10,30">
                    <TextBlock FontFamily="微软雅黑">对不起,系统已挂联系逆天重装Win10!</TextBlock>
                </Border>
                <!--底部-->
                <Border BorderBrush="Black" 
                BorderThickness="2"
                CornerRadius="0,0,10,10"
                VerticalAlignment="Bottom"
                Height="30">
                    <!--底部按键-->
                    <Grid>
                        <SymbolIcon Symbol="Back" HorizontalAlignment="Left" Margin="50,0,0,0" Width="50" />
                        <SymbolIcon Symbol="Home" HorizontalAlignment="Center" Width="50" />
                        <SymbolIcon Symbol="Zoom" HorizontalAlignment="Right" Margin="0,0,50,0" Width="50" />
                    </Grid>
                </Border>
            </Grid>
        </Border>
    </Grid>
</Page>

 

WPF

效果:(边框想要div必须注意==>WindowStyle="None" Background="Transparent" AllowsTransparency="True" MouseLeftButtonDown="DragWindow")

代码:

<Window x:Class="WaterMarkAPP.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="水印工具" Height="545" Width="298" Background="Transparent" AllowsTransparency="True" 
        WindowStyle="None" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" MouseLeftButtonDown="DragWindow">

    <!--快乐玩耍:DIV一个手机-->
    <!--手机整体-->
    <Border BorderBrush="Green" 
            Background="Black"
            BorderThickness="4"
            CornerRadius="10,10,10,10">
        <Grid>
            <!--主屏幕-->
            <Border BorderBrush="Gray" 
                BorderThickness="2"
                Margin="10,50,10,40">
                <Grid Background="#FF151515">
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <TextBlock FontFamily=
首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Windows phone开发 页面布局之屏.. 下一篇09.移动先行之谁主沉浮----控件之..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目