1

WPFアプリケーションを再開発していますが、アプリケーションはそれぞれから個別のコンポーネントを使用するため、次の2つのアセンブリを使用します。

WPFToolkitとPresentationFramework。

私のXaml.csではextern alias、名前空間を使用していましたSystem.Windows.TemplateVisualStateが、それはすべて問題ありません。私の質問はXaml.xamlにありますが、とをどのように区別WPFToolkit.System.Windows.TemplateVisualStatePresentationFramework.System.Windows.TemplateVisualStateますか?

以下は私のXamlの上部です:

 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
 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:CAIS2"
 xmlns:CodeLib="clr-namespace:CodeLib;assembly=CodeLib"
 xmlns:CAISCommon="clr-namespace:CAISCommon;assembly=CAISCommon"  >

Resharperが不満を言っているのは次のとおりです。

 <VisualStateManager.VisualStateGroups>
     <VisualStateGroup x:Name="LoginStates">
         <Windows:VisualState x:Name="LoggedOut">
             ......
4

1 に答える 1

0

WPF ツールキット用の名前空間が既に設定されているように見えるので、次のようにすることはできません。

<toolkit:VisualStateManager.VisualStateGroups>
    <toolkit:VisualStateGroup x:Name="LoginStates">
        <Windows:VisualState x:Name="LoggedOut">

私はこのextern alias方法を使用した結果についてあまり詳しくないので、それがこれを無効にするかどうかはわかりません。

于 2012-06-14T13:36:47.563 に答える