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>
相关推荐
世人万千丶7 小时前
鸿蒙跨端框架Flutter学习day 2、常用UI组件-层叠布局 Stack & Positioned
学习·flutter·ui·实时互动·harmonyos·鸿蒙
航Hang*8 小时前
Photoshop 图形与图像处理技术——第9章:实践训练1——绘制禁烟标志和奥运五环
图像处理·笔记·学习·ui·photoshop
未定义.22111 小时前
第5篇:进阶优化:数据驱动+日志体系+失败重试实战
python·ui·自动化·jenkins·集成测试·pytest
上海物联网12 小时前
Prism Regions-自定义区域适配器实现开发者将任意 WPF 控件转换为可动态加载视图的区域容器
面试·wpf
世人万千丶13 小时前
鸿蒙跨端框架Flutter学习day 2、常用UI组件-折行布局 Wrap & Chip
学习·flutter·ui·华为·harmonyos·鸿蒙
未定义.22114 小时前
第4篇:企业级框架搭建,Pytest+PO模式从0到1实战
python·ui·自动化·jenkins·集成测试·pytest
尤老师FPGA1 天前
使用ZYNQ芯片和LVGL框架实现用户高刷新UI设计系列教程(第四十四讲)
ui
小雨下雨的雨1 天前
Flutter 框架跨平台鸿蒙开发 —— SingleChildScrollView 控件之长内容滚动艺术
flutter·ui·华为·harmonyos·鸿蒙
zFox1 天前
五、开始项目实战(搭建完整项目)
ui·kotlin
guangzan1 天前
AI → JSON → UI
ui·ai·zod