手把手教你如何使用HandyControl,一款开源WPF控件神器

1.首先创建你的WPF工程

2.从Nuget中安装HandyControl

VS2017默认已经集成Nuget包管理工具,直接搜索  HandyControl  安装即可

3.在App.xaml中加入如下代码

    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml" />
        <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>

4.添加界面代码

<Window x:Class="WpfApp3.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:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
        xmlns:local="clr-namespace:WpfApp3"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
    <WrapPanel>
      <controls:RadioGroup Margin="5,16,0,0"
                           Style="{StaticResource RadioGroupSolid}"
                           Width="200">
        <RadioButton Content="全部" />
        <RadioButton Content="未发货"/>
        <RadioButton Content="已发货"
                     IsChecked="True"
                     />
      </controls:RadioGroup>
    </WrapPanel>
  </Grid>
</Window>

5.编译 运行  妥妥的没问题  感谢 NaBian 

git项目地址:https://github.com/NaBian/HandyControl

后续使用过程中有新体会将持续分享给大家,记得关注哦  这个WPF开源控件项目非常给力,强烈建议大家尝试下

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值