您好,
会员登录 快速注册
退出 ( 条未读消息)
关于本站 意见反馈 首页

公告:小宅博客网可以开发票了,需要发票的,去群里找群主哈!!
全部文章分类
  • 人工智能 >

  • 编程语言 >

  • WPF系列 >

  • ASP.NET系列 >

  • Linux >

  • 数据库 >

  • 嵌入式 >

  • WEB技术 >

  • PLC系列 >

  • 微服务与框架 >

  • 小宅DIY >

  • 学习资料 >

OpenCv基础 ANN车牌识别 yolov5车牌识别 指针式仪表识别 ROS系列 YOLO Halcon Detectron2 昇腾AI ChatGPT在线体验 英伟达JETSON ChatGLM ChatTTS FunASR 地平线 ByteTrack 魔搭社区 LangChain
C C# C++ Python Java Go
WPF
ASP.NET小功能 GPS定位系统-MVC GPS定位系统-VUE ASP.NET WebRTC
Linux Linux内核 Shell MakeFile
MySql SqlServer Oracle
STM8 STM32 51单片机
VUE入门 HTML JavaScript CSS layui镜像网站 ElementUi中文官网 element-plus 图标
三菱 欧姆龙 西门子 施耐德 松下 台达
IOTSharp IOTGateway ABP FRAMEWORK Docker
亚克力音响 编程仙途:智驭万法
面试题与技巧 Python入门技能树 微软C#教程
首页 编程之美 工具下载 全国就业 流量地图 文心一言
WPF
内容介绍 1、新建WPF工程 2、Application介绍 3、Dispatcher介绍 4、Window 介绍 5、主要布局属性介绍 6、Grid网格布局 7、UniformGrid布局 8、DockPanel与ViewBox布局 9、Border与ViewBox布局 10、依赖属性(一) 11、依赖属性(二) 12、依赖属性(三) 13、依赖属性(四) 14、WPF中的数据绑定(一) 15、WPF中的数据绑定(二) 16、WPF中的数据绑定(三) 17、WPF中的数据绑定(四) 18、ListView示例(一) 19、ListView示例(二) 20、DataGrid示例(一) 21、DataGrid示例(二) 22、DataGrid示例(三) 23、引用FontAwesome矢量图 24、ListBox日志效果 25、Polygon绘制多边形 26、Ellipse绘制实心圆 27、数据模板DataTemplate 基于WPF的exe远程升级程序
22、DataGrid示例(三)
24、ListBox日志效果
激萌の小宅 小宅博客网 WPF

文章作者:激萌の小宅

促销:¥0

价格:¥0

配送方式: 购买后立即生效(如购买异常,请联系站长)
付款之后一定要等待自动跳转结束,否则购买可能会失败
  • 0 天

    有效期

  • 0

    总销量

  • 0

    累计评价

引用FontAwesome矢量图 - (二十三)


矢量图文件FontAwesome下载:FontAwesome.otf


目录结构如下:


效果如下:


代码如下:

<Window x:Class="WpfApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="200" Width="500">
    
    <!--引用矢量图路径-->
    <Window.Resources>
        <Style x:Key="FontAwesome">
            <Setter Property="TextElement.FontFamily" Value="pack://application:,,,/Fonts/#FontAwesome" />
        </Style>
    </Window.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="5*"/>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="2*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!--使用矢量图-->
        <Button Grid.Column="0" Grid.Row="0" Content="&#xf000; Button1" Width="120" Height="40" Style="{DynamicResource FontAwesome}" FontSize="20" />
        <Button Grid.Column="1" Grid.Row="0" Content="&#xf001; Button2" Width="120" Height="40" Style="{DynamicResource FontAwesome}" FontSize="20" />
        <Button Grid.Column="2" Grid.Row="0" Content="&#xf002; Button3" Width="120" Height="40" Style="{DynamicResource FontAwesome}" FontSize="20" />
        
        <Button Grid.Column="0" Grid.Row="1" Content="&#xf006; Button1" Width="75" Height="27" Style="{DynamicResource FontAwesome}" />
        <Button Grid.Column="1" Grid.Row="1" Content="&#xf007; Button2" Width="75" Height="27" Style="{DynamicResource FontAwesome}" />
        <Button Grid.Column="2" Grid.Row="1" Content="&#xf008; Button3" Width="75" Height="27"  Style="{DynamicResource FontAwesome}" />
        
        <TextBlock Grid.Column="0" Grid.Row="2" Text="&#xf003; Text1" Style="{DynamicResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <TextBlock Grid.Column="1" Grid.Row="2" Text="&#xf004; Text2" Style="{DynamicResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center" />
        <TextBlock Grid.Column="2" Grid.Row="2" Text="&#xf005; Text3" Style="{DynamicResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</Window>
22、DataGrid示例(三)
24、ListBox日志效果

友情链接: CSDN激萌の小宅 95知识库 自考题库 罗分明个人网络博客 精益编程leanboot

小宅博客  www.bilibili996.com All Rights Reserved. 备案号: 闽ICP备2024034575号

网站经营许可证  福建省福州市 Copyright©2021-2025 版权所有

小宅博客
首页 智能家居 地图定位
公告:小宅博客网可以开发票了,需要发票的,去群里找群主哈!!

文章作者:激萌の小宅

促销:¥0

价格:¥0

配送方式: 购买后立即生效(如购买异常,请联系站长)
付款之后一定要等待自动跳转结束,否则购买可能会失败
  • 0 天

    有效期

  • 0

    总销量

  • 0

    累计评价

引用FontAwesome矢量图 - (二十三)


矢量图文件FontAwesome下载:FontAwesome.otf


目录结构如下:


效果如下:


代码如下:

<Window x:Class="WpfApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="200" Width="500">
    
    <!--引用矢量图路径-->
    <Window.Resources>
        <Style x:Key="FontAwesome">
            <Setter Property="TextElement.FontFamily" Value="pack://application:,,,/Fonts/#FontAwesome" />
        </Style>
    </Window.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="5*"/>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="2*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!--使用矢量图-->
        <Button Grid.Column="0" Grid.Row="0" Content="&#xf000; Button1" Width="120" Height="40" Style="{DynamicResource FontAwesome}" FontSize="20" />
        <Button Grid.Column="1" Grid.Row="0" Content="&#xf001; Button2" Width="120" Height="40" Style="{DynamicResource FontAwesome}" FontSize="20" />
        <Button Grid.Column="2" Grid.Row="0" Content="&#xf002; Button3" Width="120" Height="40" Style="{DynamicResource FontAwesome}" FontSize="20" />
        
        <Button Grid.Column="0" Grid.Row="1" Content="&#xf006; Button1" Width="75" Height="27" Style="{DynamicResource FontAwesome}" />
        <Button Grid.Column="1" Grid.Row="1" Content="&#xf007; Button2" Width="75" Height="27" Style="{DynamicResource FontAwesome}" />
        <Button Grid.Column="2" Grid.Row="1" Content="&#xf008; Button3" Width="75" Height="27"  Style="{DynamicResource FontAwesome}" />
        
        <TextBlock Grid.Column="0" Grid.Row="2" Text="&#xf003; Text1" Style="{DynamicResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <TextBlock Grid.Column="1" Grid.Row="2" Text="&#xf004; Text2" Style="{DynamicResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center" />
        <TextBlock Grid.Column="2" Grid.Row="2" Text="&#xf005; Text3" Style="{DynamicResource FontAwesome}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</Window>