13

Blend for Visual Studio でときどきコンパイラ例外が発生します。すべてがコンパイルされ、素晴らしく機能しているのに、突然 BAM! 特定の名前空間にオブジェクトが存在しないというコンパイラ エラーが表示されます。彼らが消える前に、Blend のクリーニングと再構築、および終了と再起動を 1 時間プレイする必要があります。私のライブラリはすべて最新であり、それ以外はすべて問題ありません。これが彼らに起こった人は他にいませんか?やめてほしいです。時間の無駄です。

Visual Studio でもコンパイラ エラーが発生します。

ありがとう。

アップデート

例えば、

エラー 5 プロパティ 'DesignWidth' は XML 名前空間 ' http://schemas.microsoft.com/expression/blend/2008 'に存在しません。行 15 位置 5. C:\MyPath\MyControl.xaml 15 5 EasyBuilder

私の知る限りDesignWidth、その名前空間には非常に多くのものが存在します。

XAML (役に立たないというわけではありません)

<UserControl x:Name="UserControl" x:Class="EasyBuilder.MainControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             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:ignore="http://www.ignore.com"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
             xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
             xmlns:surface="http://schemas.microsoft.com/surface/2008" 
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             xmlns:gif="http://wpfanimatedgif.codeplex.com"
             xmlns:local="clr-namespace:EasyBuilder"
             xmlns:res="clr-namespace:EasyBuilder.Infrastructure.Resources"
             xmlns:system="clr-namespace:System;assembly=mscorlib"
             d:DesignWidth="640" d:DesignHeight="480">
    <UserControl.Resources>
        <res:MainViewStrings x:Key="LocalStrings" />
    </UserControl.Resources>

    <UserControl.DataContext>
        <Binding Path="Main" Source="{StaticResource Locator}"/>
    </UserControl.DataContext>

    <Grid x:Name="LayoutRoot" Background="{DynamicResource PageBackgroundBrush}">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="OpenSelectionStateGroup">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:0.15">
                        <VisualTransition.GeneratedEasingFunction>
                            <CircleEase EasingMode="EaseOut"/>
                        </VisualTransition.GeneratedEasingFunction>
                    </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="SelectionClosedState"/>
                <VisualState x:Name="SelectionOpenedState">
                    <Storyboard>
                        <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="OpenFileSelection">
                            <DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
                        </BooleanAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CloseFileSelection">
                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                        <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="CloseFileSelection">
                            <DiscreteBooleanKeyFrame KeyTime="0" Value="True"/>
                        </BooleanAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OpenFileSelection">
                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="FileSelectionShadow">
                            <EasingDoubleKeyFrame KeyTime="0" Value="12.5"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="FileSelection">
                            <EasingDoubleKeyFrame KeyTime="0" Value="450"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FileSelectionControl">
                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Frame x:Name="ContentFrame" Margin="0,0,100,0" Grid.ColumnSpan="2" NavigationUIVisibility="Hidden"/>
        <Grid x:Name="FileSelection" Grid.Column="1" Width="100" Background="{DynamicResource AsideSectionBackgroundBrush}">
            <Border x:Name="FileSelectionShadow" Width="12.5" HorizontalAlignment="Left">
                <Border.Background>
                    <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                        <GradientStop Color="#3F000000" Offset="0"/>
                        <GradientStop Color="#00000000" Offset="1"/>
                    </LinearGradientBrush>
                </Border.Background>
            </Border>
            <Button x:Name="OpenFileSelection" Template="{DynamicResource InvisibleButtonTemplate}" HorizontalContentAlignment="Right" Panel.ZIndex="1" Margin="0">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <ei:GoToStateAction StateName="SelectionOpenedState"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
                <TextBlock TextWrapping="Wrap" Text="{Binding OpenActionText, Mode=OneWay, Source={StaticResource LocalStrings}}"  Margin="0,0,23,0" Style="{DynamicResource AsideSectionLabel}"/>
            </Button>
            <local:FileSelectionView x:Name="FileSelectionControl" d:LayoutOverrides="Width" Opacity="0" DataContext="{Binding Files, Mode=OneWay}"/>
        </Grid>
        <Button x:Name="CloseFileSelection" Template="{DynamicResource InvisibleButtonTemplate}" IsHitTestVisible="False" Opacity="0" Margin="0" d:IsHidden="True">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseEnter">
                    <ei:GoToStateAction StateName="SelectionClosedState"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>
        <Border x:Name="UserMessage" Background="#BF000000" Visibility="{Binding UserMessenger.IsShowingMessage, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}" Grid.ColumnSpan="2">
            <Border VerticalAlignment="Center" Style="{DynamicResource UserMessageStyle}" Background="#FFE2E2E2" BorderBrush="{x:Null}" BorderThickness="0" MaxWidth="800" HorizontalAlignment="Center" MinWidth="400">
                <Border.Effect>
                    <DropShadowEffect Opacity="0.5" ShadowDepth="10"/>
                </Border.Effect>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <TextBlock TextWrapping="Wrap" Text="{Binding UserMessenger.MessageText, Mode=OneWay}" Margin="0,0,0,10" HorizontalAlignment="Center" MinHeight="58" Style="{DynamicResource TextBlockBase}"/>
                    <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
                        <Border x:Name="OKAction" Style="{DynamicResource ButtonBorderStyle}" Margin="15,0,0,0" Height="50" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="{Binding UserMessenger.ShowOkButton, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
                            <Border.Effect>
                                <DropShadowEffect Opacity="0.33"/>
                            </Border.Effect>
                            <Button Template="{DynamicResource FlatButtonTemplate}" Command="{Binding UserMessenger.CloseCommand, Mode=OneWay}" Margin="0">
                                <Button.CommandParameter>
                                    <system:String>OK</system:String>
                                </Button.CommandParameter>
                                <Image Height="44" Source="Skins/Images/OK.png"/>
                            </Button>
                        </Border>
                        <Border x:Name="CancelAction" Style="{DynamicResource ButtonBorderStyle}" Margin="15,0,0,0" Height="50" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="{Binding UserMessenger.ShowCancelButton, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
                            <Border.Effect>
                                <DropShadowEffect Opacity="0.33"/>
                            </Border.Effect>
                            <Button Template="{DynamicResource FlatButtonTemplate}" Command="{Binding UserMessenger.CloseCommand, Mode=OneWay}" Margin="0">
                                <Button.CommandParameter>Cancel</Button.CommandParameter>
                                <Image Height="44" Source="Skins/Images/Cancel.png"/>
                            </Button>
                        </Border>
                    </StackPanel>
                </Grid>
            </Border>
        </Border>
    </Grid>
</UserControl>
4

1 に答える 1