在好例子网,分享、交流、成长!
您当前所在位置:首页C# 开发实例C#语言基础 → WPF自绘皮肤

WPF自绘皮肤

C#语言基础

下载此实例
  • 开发语言:C#
  • 实例大小:5.33M
  • 下载次数:23
  • 浏览次数:807
  • 发布时间:2019-05-10
  • 实例类别:C#语言基础
  • 发 布 人:d1093877512
  • 文件格式:.rar
  • 所需积分:2
 相关标签: wpf 自绘 皮肤 wp

实例介绍

【实例简介】

【实例截图】

from clipboard

【核心代码】

<Window x:Class="LG_Dome.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:LG_Dome"
        xmlns:View="clr-namespace:LG_Dome.Properties"
        mc:Ignorable="d"
       
        WindowStartupLocation="CenterScreen"
       
       WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent"
        Title="MainWindow" Height="366.038" Width="633.019">

    <!--<Window.Background >

        <ImageBrush ImageSource="./images/05live.gif"   Opacity="0.5"></ImageBrush>
    </Window.Background>-->
    <Grid>
        <StackPanel VerticalAlignment="Center">


            <StackPanel>
                <Label Foreground="Red"  HorizontalAlignment="Center" FontSize="55" FontFamily="楷体" Margin="193,0,130,0" Width="310" Height="62" Content="登录系统"/>
                <Border  IsHitTestVisible="True"  BorderBrush="Red" Width="300" Height=" 250" BorderThickness="4" CornerRadius="3">

                    <Border BorderBrush="LemonChiffon" Width="280" Height=" 230" BorderThickness="2" CornerRadius="3">
                        <!--<UniformGrid Rows="2" Columns="1" >
                <Button Height="30" Width="55" VerticalAlignment="Bottom" HorizontalAlignment="Left" VerticalContentAlignment="Center">点击确认</Button>
                <TextBox Grid.Row="0" Grid.Column="2" Height="30" Width="150"></TextBox>
            </UniformGrid>-->
                        <Grid Background="Black"  >
                            <Grid.RowDefinitions >

                                <RowDefinition />
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="49*"/>
                                <ColumnDefinition Width="89*"/>

                            </Grid.ColumnDefinitions>
                            <Label Grid.Row="0" Grid.Column="0" Foreground="Red" Margin="15,0,21,2" VerticalAlignment="Bottom" Height="25" Content="用户登录:"/>
                            <TextBox Grid.Row="0" x:Name="username" Grid.Column="1" Margin="2,0,0,2" HorizontalAlignment="Left" Height="30" Width="150" VerticalAlignment="Bottom"/>
                            <Label Grid.Row="1" Grid.Column="0" Margin="15,2,22,0" Foreground="Red" VerticalAlignment="Top" Height="25" Content="用户密码:"/>
                          
                            <PasswordBox Grid.Row="1" DataContext="*"  x:Name="userpwd" Grid.Column="1" Margin="2,2,0,0" HorizontalAlignment="Left" Height="30" Width="150" VerticalAlignment="Top"/>
                            <Button Grid.Row="1" Grid.Column="1" Margin="23,47,0,46" HorizontalAlignment="Left" Width="50" Click="Button_Click" Content="登录"/>
                            <Button Grid.Row="1" Grid.Column="1" Margin="90,47,43,46" Content="取消" Click="button_Close"/>
                            <Label x:Name="opntion" Foreground="Red" Grid.ColumnSpan="2" Content="Label" HorizontalAlignment="Left" Height="30" Margin="41,19,0,0" VerticalAlignment="Top" Width="169"/>
                            <Button x:Name="button" Content="最小化" Opacity="0.5" Click="Button_Click_Close" Grid.Column="1" Height="28" Margin="162,-53,-31,0" VerticalAlignment="Top"/>
                        </Grid>
                    </Border>
                </Border>
            </StackPanel>

        </StackPanel>
    </Grid>


    <!--<UniformGrid Rows="3" Columns="3">
        <Button Grid.Row="0" Grid.Column="0" Height="40" Width="100">lefssss</Button>
        <Button Grid.Row="0 " Grid.Column="1" Height="40" Width="100">ces</Button>
        <Button Grid.Row="0" Grid.Column="2" Height="40" Width="100">ces</Button>
        <Button Grid.Row="1" Grid.Column="0" Height="40" Width="100">ces</Button>
        <Button Grid.Row="1" Grid.Column="1" Height="40" Width="100">ces</Button>
    </UniformGrid>-->
    <!--<Grid Margin="189,69,156,72" >
        <Border CornerRadius="8,8,8,8" Background="Black" Height="Auto">
        </Border>
        <Label Content="用户名:"  Height="30" Width="50" HorizontalAlignment="Left" Margin="29,56,0,108"  />
        <TextBox  HorizontalScrollBarVisibility="Hidden" Height="25" Margin="90,61,48,108"/>
        <Label Content="密   码:" Height="30" Width="50" HorizontalAlignment="Left" Margin="28,95,0,69"  ></Label>
        <TextBox  HorizontalScrollBarVisibility="Hidden" Height="25" Margin="90,98,48,71"/>

    </Grid>-->

    <!--<Grid ShowGridLines="True" >
        <Grid.RowDefinitions>
            <RowDefinition Height="*" ></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Button Grid.Row="0" Grid.Column="0" Height="40" Width="100">lefssss</Button>
        <Button Grid.Row="0 " Grid.Column="1" Height="40" Width="100">ces</Button>
        <Button Grid.Row="0" Grid.Column="2" Height="40" Width="100">ces</Button>
        <Button Grid.Row="1" Grid.Column="0" Height="40" Width="100">ces</Button>
        <Button Grid.Row="1" Grid.Column="1" Height="40" Width="100">ces</Button>
        <GridSplitter Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Center" ShowsPreview="False" Background="Red"></GridSplitter>
    </Grid>-->
    <!--<Border BorderBrush="Red" BorderThickness="3,2,3,3" Width="250" Height="200" CornerRadius="8">

        <Grid ShowGridLines="True"  >

            <Button Grid.Row="0" Grid.Column="0" Height="20" Width="40">lefssss</Button>
            <Button Grid.Row="0 " Grid.Column="1" Width="20" Height="20"></Button>
            -->
    <!--<Grid.RowDefinitions x:Uid="s">
                
                <RowDefinition ></RowDefinition>
                <RowDefinition></RowDefinition>
                <RowDefinition></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>-->

    <!--<Grid.ColumnDefinitions>
                
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>-->
    <!--
        </Grid>
        
        -->
    <!--WrapPanel Margin="13" Orientation="Vertical">
            <Button Content="11212" VerticalAlignment="Top"/>
            <Button Content="21212" MaxHeight="100"/>
        </WrapPanel>-->
    <!--<DockPanel LastChildFill="True">
            <Button Content="11212" VerticalAlignment="Top" />
            <Button Content="21212" MaxHeight="123" Padding="11"/>
        </DockPanel>-->

    <!--<StackPanel Width="300" Orientation="Vertical">
            <TextBox  Width="100" MaxHeight="100" MaxWidth="120" HorizontalAlignment="Right" Margin="0,0,20,0" Text="1121213"/>
            <Label  Content="登录:" Margin="130,0" RenderTransformOrigin="0.454,-0.288"/>
            <Button Content="1"/>
            <Button Content="2"/>
        </StackPanel>-->
    <!--
    </Border>-->

</Window>

标签: wpf 自绘 皮肤 wp

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警