扩展的WPF工具包-如何添加对项目的引用? [英] Extended WPF Toolkit - How to add reference to project?

查看:266
本文介绍了扩展的WPF工具包-如何添加对项目的引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WPF的新手。我想使用日期时间选择器。我已经从下面的站点下载了扩展的WPF工具包-1.9.0。

I am new to WPF. I want to use datetime picker. I have downloaded the "Extended WPF Toolkit - 1.9.0" from below site.

http://wpftoolkit.codeplex.com/releases/view/96972

我已解压缩文件,发现两个dll。一个是 WPFToolkit.dll和 Xceed.Wpf.Toolkit.dll。

I have unzip file and found two dll. One is "WPFToolkit.dll" and "Xceed.Wpf.Toolkit.dll".

现在如何在我的项目中添加这两个dll?和
如何在项目中使用日期时间控件。

Now How to add these two dll in my project? and How to use datetime control in my project.

推荐答案

首先,请在项目中引用这些dll。

在解决方案资源管理器中右键单击引用,然后单击添加引用,现在浏览并添加两个

First, reference those dlls in your project.
Right click on References in the Solution Explorer and click Add Reference, now browse and add the two dlls.

第二次,构建项目一次以在XAML中为新添加的dll启用智能感知。

Second, build the project once to enable intellisense in XAML for the newly added dlls.

第三,在您的XAML文件中添加以下名称空间

Third, in your XAML file add the following namespace

    xmlns:wpfTool="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"

提示:键入 xmlns:customName = wpftool ,您应该能够看到所有相关名称空间的智能感知列表。

Tip: Type xmlns:customName="wpftool" and you should be able to see the intellisense list all the relevant namespaces.

此处是XAML代码:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wpfTool="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <wpfTool:DateTimePicker Grid.Row="0">

        </wpfTool:DateTimePicker>
    </Grid>
</Window>

这篇关于扩展的WPF工具包-如何添加对项目的引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆