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>
相关推荐
benben0443 小时前
Unity3D仿星露谷物语开发34之单击Drop项目
游戏·ui·unity·游戏引擎
benben0448 小时前
Unity3D仿星露谷物语开发33之光标位置可视化
游戏·ui·unity·游戏引擎
ailinghao12 小时前
使用Cusor 生成 Figma UI 设计稿
ui·ai·figma
"孙小浩15 小时前
HarmonyOS应用开发者高级-编程题-001
华为·wpf·harmonyos
yngsqq15 小时前
003集——《利用 C# 与 AutoCAD API 开发 WPF 随机圆生成插件》(侧栏菜单+WPF窗体和控件+MVVM)
wpf
湛谷Gooyuit1 天前
LVGL修改标签文本,GUI Guider的ui不生效
ui
夏之小星星1 天前
element-ui自制树形穿梭框
前端·javascript·ui·elementui·vue
Kika写代码1 天前
【Android】UI开发:XML布局与Jetpack Compose的全面对比指南
android·xml·ui
qq_196055871 天前
WPF插入背景图
wpf