当前位置: 首页 > news >正文

WPF 免费UI 控件HandyControl

示例效果和代码 直接可以用

Button 按钮 | HandyOrg

1.安装 , 输入 HandyControl

2.<!--配置HandyControl-->

<!--配置HandyControl-->
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <!--配置HandyControl-->
            <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
            <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>            
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

3.使用示例

<Window x:Class="PrismWpfApp.Views.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:PrismWpfApp"
        xmlns:prism="http://prismlibrary.com/"
        prism:ViewModelLocator.AutoWireViewModel="True"
        mc:Ignorable="d"
        Title="{Binding Title}" Height="450" Width="800">
    <Grid>
        <!--<TextBlock Text="{Binding Title}"/>-->
        <Grid.RowDefinitions>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition ></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Button Content="区域A" Width="80" Height="30" Command="{Binding ShowContentCommand}" CommandParameter="UserControlA" ></Button>
            <Button Content="区域B" Width="80" Height="30" Command="{Binding ShowContentCommand}" CommandParameter="UserControlB" ></Button>
            <Button Content="区域C" Width="80" Height="30" Command="{Binding ShowContentCommand}" CommandParameter="UserControlC" ></Button>

            <!--HandyControl-->
            <Label Content="原生控件"></Label>
            <Label Content="Handycontrol测试" Style="{StaticResource ResourceKey=LabelInfo}"/>
        </StackPanel>

        <ContentControl Grid.Row="1" prism:RegionManager.RegionName="ContentRegions"></ContentControl>
    </Grid>
</Window>

http://www.dtcms.com/a/111527.html

相关文章:

  • 大模型-爬虫prompt
  • 字符串拼接
  • Python语料数据清洗方法之一
  • 从代码学习深度学习 - LSTM PyTorch版
  • 【硬件模块】数码管模块
  • 理解OSPF Stub区域和各类LSA特点
  • QEMU学习之路(5)— 从0到1构建Linux系统镜像
  • 【学习篇】fastapi接口定义学习
  • 19.TCP相关实验
  • 哈密尔顿路径(Hamiltonian Path)及相关算法题目
  • 前端快速入门学习3——CSS介绍与选择器
  • 第三季:挪威
  • 阿里Qwen 创建智能体,并实现ubantu系统中调用
  • 对用户登录设计测试用例
  • Transformer由入门到精通(一):基础知识
  • CSS快速上手
  • BUUCTF-web刷题篇(10)
  • 封装自己的api签名sdk
  • 数据结构 -- 图的存储
  • SpringBoot定时任务深度优化指南
  • ubuntu部署ollama+deepseek+open-webui
  • OpenCV 实现对形似宝马标的黄黑四象限标定位
  • 字符串移位包含问题
  • CExercise_1_4continue关键字在while循环和for循环中,实现的功能有什么区别?
  • Neo4j操作数据库(Cypher语法)
  • NO.61十六届蓝桥杯备战|基础算法-双指针|唯一的雪花|逛画展|字符串|丢手绢(C++)
  • 管理系统 UI 设计:提升企业办公效率的关键
  • (多看) CExercise_05_1函数_1.2计算base的exponent次幂
  • 花卉识别分类系统,Python/resnet18/pytorch
  • MySQL简介