15

参照に WPFToolkit.dll を追加し、次の行に .xaml ファイルを追加しました。

xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit"

そして次の行の前:

xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"

どちらの場合も一直線に

<toolkit:NumericUpDown Value="10" Increment="1" Maximum="10" Minimum="0" />

エラーがあります:

エラー 1 タグ 'NumericUpDown' が XML 名前空間 'http://schemas.microsoft.com/wpf/2008/toolkit' に存在しません。行 20 位置 18. C:\Users\Diament\Documents\Visual Studio 2008\Projects\MyBasicFlyffKeystroke\MyBasicFlyffKeystroke\Window.xaml 20 18 MyBasicFlyffKeystroke

問題はどこだ?:(

4

7 に答える 7

9

私はまったく同じ問題を抱えていました。

ブロック解除の手順をスキップして単純に解凍すると、xaml プレビュー ウィンドウが読み込まれず、VS から「名前空間http://schemas.xceed.com/wpf/xaml/toolkitに IntegerUpDown コンポーネントが存在しません」というエラーが表示され続けます。 、オートコンプリートはその名前空間内のすべてのコンポーネントを喜んでリストしますが。

ただし、最初にzipファイルのブロックを解除してから抽出し、VSでdllを参照すると、すべて正しく機能します。

TL;DR:インストール手順 に正確に従ってください。特に、最初に zip ファイルのブロックを解除してください。

于 2015-12-09T11:05:08.217 に答える
5

NumericUpDown は、基本的な WPF ツールキットの一部ではなく、拡張 WPF ツールキットの一部です。

IntegerUpDown (または提供されている派生クラスのいずれか) を使用し、アプリケーションで適切な DLL を必ず使用してください。拡張 WPF ツールキット DLL ( Xceed.Wpf.Toolkit.Dll ) がプロジェクトで参照されている場合に IntegerUpDown を使用する例を次に示します。

<Window x:Class="WpfApplication4.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
        Title="Window1" Height="300" Width="300">
    <Grid>
      <toolkit:IntegerUpDown Value="10" Increment="1" Minimum="0" Maximum="10" />
   </Grid>
</Window>
于 2013-02-20T17:38:23.077 に答える
2

試す

xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
于 2012-07-02T22:55:53.777 に答える
2

http://wpftoolkit.codeplex.com/documentation

インストールと使用方法

注意: Extended WPF Toolkit は .NET Framework 4.0 に依存しています。Toolkit の機能を使用するには、.NET Framework 4.0 をインストールする必要があります。

Extended WPF Toolkit バイナリを使用するための手順:

1.Install .NET Framework 4.0. 
2.Download the ExtendedWPFToolkit_Binaries 
3.Unblock the ZIP file. 1.Right-click ExtendedWPFToolkit_Binaries.zip -> Properties -> Unblock 

4.Unzip the ExtendedWPFToolkit_Binaries.zip 
5.Reference the binaries in your project: 
    1.Reference WPFToolkit.Extended.dll in your project (Xceed.Wpf.DataGrid.dll for the datagrid control) 
    2.Add a using statement ("using Xceed.Wpf.Toolkit;" for most of the controls, "using Xceed.Wpf.DataGrid;" for the datagrid control) to the top of .cs files 
    3.Add a new xmlns (xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" for most of the controls, xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" for the datagrid control) to the top of XAML files 
    4.Remember to use the namespace prefix (in the above example, <xctk: ...> or <xcdg: ...>) in the body of your XAML 

NuGet を使用したインストール

1.Install NuGet (can be downloaded for  this link: https://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c). 
2.Open your Visual Studio. 
3.Open your solution/project. 
4.Open Tools menu, select Library Package Manager and select  Package Manager Console 
5.Run the following command Install-Package Extended.Wpf.Toolkit 
    1.Add a using statement ("using Xceed.Wpf.Toolkit;" for most of the controls, "using Xceed.Wpf.DataGrid;" for the datagrid control) to the top of .cs files

    2.Add a new xmlns (xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" for most of the controls, xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" for the datagrid control) to the top of XAML files 
    3.Remember to use the namespace prefix (in the above example, <xctk: ...> or <xcdg: ...>) in the body of your XAML 
于 2016-10-14T20:11:18.203 に答える
0

注: Extended WPF Toolkit - Numeric Up Downは廃止されたと考えてください。また、「特殊な」バージョンのいずれかを使用することを強くお勧めします。ちなみに、これはErrorではなくWarningを生成するはずです。

アセンブリが見つからない場合は、プロジェクトとWpf Toolkitバージョンの互換性を確認してください。

于 2012-07-02T17:40:41.143 に答える