我的intellisense有问题。它适用于代码,但不适用于xaml代码(wpf)。
1st image: Intelissense not working
2nd image: I comment on the 1st usercontrol and the intellisense works.
这里的代码在usercontrol" cuAccessoiresAutres":
<UserControl x:Class="MicroSecu.ControleUtilisateur.cuAccessoiresAutres"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ControleUtilisateur="clr-namespace:MicroSecu.ControleUtilisateur"
mc:Ignorable="d"
d:DesignHeight="251" d:DesignWidth="672">
<UserControl.Resources>
<SolidColorBrush x:Key="controlBorderBrush" Color="LightGray" />
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!--En tête-->
<Border Grid.Row="0" Grid.Column="0" BorderThickness="0,0,1,1" BorderBrush="{StaticResource controlBorderBrush}"></Border>
<Border Grid.Row="0" Grid.Column="1" BorderThickness="1,2,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Gauche" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" FontWeight="Bold"></TextBlock>
</Border>
<Border Grid.Row="0" Grid.Column="2" BorderThickness="1,2,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Droit" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="16" FontWeight="Bold"></TextBlock>
</Border>
<!--Profil porteur-->
<Border Grid.Row="1" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Profil porteur" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="12" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="1" BorderThickness="1,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.ProfilPorteurGauche}" IsEnabled="{Binding MaConsole.ProfilPorteurGaucheEstDispo}"></CheckBox>
</Border>
<Border Grid.Row="1" Grid.Column="2" BorderThickness="1,1,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.ProfilPorteurDroit}" IsEnabled="{Binding MaConsole.ProfilPorteurDroitEstDispo}"></CheckBox>
</Border>
<!--Anneau décalé-->
<Border Grid.Row="2" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Anneau décalé" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="12" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="2" Grid.Column="1" BorderThickness="1,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.AnneauDécaléGauche}" IsEnabled="{Binding MaConsole.AnneauDécaléGaucheEstDispo}"></CheckBox>
</Border>
<Border Grid.Row="2" Grid.Column="2" BorderThickness="1,1,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.AnneauDécaléDroit}" IsEnabled="{Binding MaConsole.AnneauDécaléDroitEstDispo}"></CheckBox>
</Border>
<!--Glissière de reprise-->
<Border Grid.Row="3" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Glissière de reprise" VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" BorderThickness="1,1,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.GlissièreDeReprise}" IsEnabled="{Binding MaConsole.GlissièreDeRepriseEstDispo}"></CheckBox>
</Border>
<!--Glissière de reprise plateau arrière-->
<Border Grid.Row="4" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Glissière de reprise plateau arrière" VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" BorderThickness="1,1,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.GlissièreDeReprisePlateauArrière}" IsEnabled="{Binding MaConsole.GlissièreDeReprisePlateauArrièreEstDispo}"></CheckBox>
</Border>
<!--Tôle sur extensible-->
<Border Grid.Row="5" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Tôle sur extensible" VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" BorderThickness="1,1,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.TôleSurExtensible}" IsEnabled="{Binding MaConsole.TôleSurExtensibleEstDispo}"></CheckBox>
</Border>
<!--Plaque verte RMTCE-->
<Border Grid.Row="6" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Plaque verte RMTCE" VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" BorderThickness="1,1,2,1" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.PlaqueVerteRMTCE}" IsEnabled="{Binding MaConsole.PlaqueVerteRMTCEEstDispo}"></CheckBox>
</Border>
<!--Plaque jaune benne 1000L-->
<Border Grid.Row="7" Grid.Column="0" BorderThickness="2,1,1,1" BorderBrush="{StaticResource controlBorderBrush}">
<TextBlock Text="Plaque jaune benne 1000L" VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
</Border>
<Border Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="2" BorderThickness="1,1,2,2" BorderBrush="{StaticResource controlBorderBrush}">
<CheckBox VerticalAlignment="Center" HorizontalAlignment="Center" IsChecked="{Binding MaConsole.PlaqueJaune1000L}" IsEnabled="{Binding MaConsole.PlaqueJaune1000LEstDispo}"></CheckBox>
</Border>
</Grid>