WPFDevelopers:成熟的UI工具库

WPFDevelopers:成熟的UI工具库

背景

在研究prism导航的时候发现了这个UI控件库,很有质感。加入博客收藏。

核心亮点

优雅的界面设计:控件样式美观,主题切换灵活,可以轻松融入各种应用风格。
丰富的交互效果:包括GrayscaleEffect(灰度效果)、CropImage(图片裁剪)以及动态加载提示等,为用户提供生动的视觉体验。
强大的功能性组件:如Message提示框、Badge标签、MultiSelectComboBox等,满足多样化的需求。

案例

MainWindow.xaml

<wd:Window
    x:Class="WpfPrismNavigation.Views.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
    xmlns:prism="http://prismlibrary.com/"
    xmlns:vm="clr-namespace:WpfPrismNavigation.ViewModels"
    xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
    Title="Prism - Navigation"
    Width="800"
    Height="450"
    prism:ViewModelLocator.AutoWireViewModel="True">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <wd:DrawerMenu SelectedItem="{Binding SelectedItem}">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="SelectionChanged">
                    <i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" CommandParameter="" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
            <wd:DrawerMenuItem Text="Home">
                <wd:DrawerMenuItem.Icon>
                    <wd:PathIcon Kind="Home" />
                </wd:DrawerMenuItem.Icon>
            </wd:DrawerMenuItem>
            <wd:DrawerMenuItem Text="Edge">
                <wd:DrawerMenuItem.Icon>
                    <wd:PathIcon Data="M511.949 40.96c-260.147 0-470.989 210.893-470.989 471.091 0 260.096 210.842 470.989 470.989 470.989s471.040-210.893 471.040-470.989c0-260.198-210.893-471.091-471.040-471.091zM512 665.651c-84.838 0-153.6-68.813-153.6-153.6s68.762-153.6 153.6-153.6c84.787 0 153.6 68.813 153.6 153.6s-68.813 153.6-153.6 153.6z" />
                </wd:DrawerMenuItem.Icon>
            </wd:DrawerMenuItem>
        </wd:DrawerMenu>
        <ContentControl Grid.Column="1" prism:RegionManager.RegionName="ContentRegion" />
    </Grid>
</wd:Window>
using System.Windows;

namespace WpfPrismNavigation.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}

App.xaml

<prism:PrismApplication
    x:Class="WpfPrismNavigation.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WpfPrismNavigation"
    xmlns:prism="http://prismlibrary.com/"
    xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Light.Blue.xaml" />
                <!--  需要注意 wd:Resources 必须在配色主题后,Theme="Dark" 为黑色皮肤  -->
                <wd:Resources Theme="Dark" />
                <ResourceDictionary Source="pack://application:,,,/WPFDevelopers;component/Themes/Theme.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</prism:PrismApplication>

代码

参考文章:

原文链接:https://github.com/yanjinhuagood/WpfPrismNavigation
码云链接:https://gitee.com/yanjinhua/WpfPrismNavigation


争取早日换一个好的工作。

相关推荐

  1. 工具

    2024-07-20 14:16:02       24 阅读
  2. Vue.js - 界面设计工具UI组件

    2024-07-20 14:16:02       51 阅读
  3. 分享WPFUI开源

    2024-07-20 14:16:02       26 阅读
  4. 第三方UI组件样式修改

    2024-07-20 14:16:02       63 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-20 14:16:02       52 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-20 14:16:02       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-20 14:16:02       45 阅读
  4. Python语言-面向对象

    2024-07-20 14:16:02       55 阅读

热门阅读

  1. tmp - configmap动态更新配置?

    2024-07-20 14:16:02       19 阅读
  2. ENSP常见命令及协议命令

    2024-07-20 14:16:02       19 阅读
  3. LeetCode 221. 最大正方形

    2024-07-20 14:16:02       18 阅读
  4. Vue中Key的作用

    2024-07-20 14:16:02       14 阅读
  5. VMware 虚拟机 ping 不通原因排查

    2024-07-20 14:16:02       21 阅读
  6. 数据响应式(Object.defineProperty和Proxy)

    2024-07-20 14:16:02       14 阅读
  7. 云计算的三种服务模式

    2024-07-20 14:16:02       18 阅读
  8. wps的xls文件,如何过滤掉空白没有数据的行

    2024-07-20 14:16:02       16 阅读
  9. Provider(5) - AdjustChannelsBufferProvider

    2024-07-20 14:16:02       17 阅读