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>
相关推荐
bugcome_com2 小时前
WPF 核心布局控件全解析:从 Grid 到 UniformGrid 的实战应用
c#·wpf
鸿蒙开发工程师—阿辉2 小时前
HarmonyOS 上下文的使用: 脱离 UI 怎么用 Context?
ui·华为·harmonyos
观无3 小时前
WPF-Datagrid控件的无缝滚动
wpf
前端小天才3 小时前
element-ui图标偶现乱码问题的原因和修复方法
开发语言·ui·rust
꧁༺℘₨风、凌๓༻꧂4 小时前
C# WPF 项目中集成 Pdf查看器
pdf·c#·wpf
UI设计兰亭妙微5 小时前
北京兰亭妙微:深耕UI/UX全流程,以大数据可视化与3D场景设计驱动数字体验升级
ui·信息可视化
hunteritself5 小时前
Adobe 把 Photoshop 搬进了 ChatGPT,免费的
gpt·机器学习·ui·adobe·chatgpt·智能手机·photoshop
Kiyra18 小时前
WebSocket vs HTTP:为什么 IM 系统选择长连接?
分布式·websocket·网络协议·http·设计模式·系统架构·wpf
Larry_Yanan20 小时前
Qt多进程(五)QUdpSocket
开发语言·c++·qt·学习·ui
要记得喝水21 小时前
某公司C#-WPF面试题-来自nowcoder(含答案和解析)--2
c#·wpf