C#WPF App.xaml错误
这是一个xaml文件App.xamlC#WPF App.xaml错误,c#,wpf,C#,Wpf,这是一个xaml文件App.xaml <Application x:Class="Fifteen.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Fifteen"
<Application x:Class="Fifteen.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Fifteen"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="{x:Type local:Cell}">
<Setter Property="Canvas.Top" Value="{Binding Top, RelativeSource={RelativeSource Self}}" />
<Setter Property="Canvas.Left" Value="{Binding Left, RelativeSource={RelativeSource Self}}" />
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#F7F7F7" />
<GradientStop Offset="1" Color="#E3E3E3" />
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:Cell}">
<Border Name="border"
Width="75"
Height="75"
Background="{TemplateBinding Background}"
BorderBrush="Silver"
BorderThickness="1"
CornerRadius="2">
<TextBlock Name="text"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="22"
Text="{TemplateBinding Text}" />
</Border>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
<Setter TargetName="text" Property="Foreground" Value="Red" />
<Setter TargetName="border" Property="Effect">
<Setter.Value>
<DropShadowEffect ShadowDepth="0" />
</Setter.Value>
</Setter>
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" Value="Beige" />
<Setter Property="Cursor" Value="Hand" />
</DataTrigger>
</Style.Triggers>
</Style>
</Application.Resources>
不幸的是,这并没有帮助。除此之外,我有以下错误,无法从程序集D加载“NotifyPropertyWeaverMsBuildTask.WeavingTask”任务:\Бщщщщааааааааааа1072。无法加载文件或程序集的file:///D:\“十五个\Tools\NotifyPropertyWeaverMsBuildTask.dll”或其依赖项之一。Не удается найти указанный файл. 确认声明正确,程序集及其所有依赖项都可用,并且任务包含实现Microsoft.Build.Framework.ITask的公共类。是否尝试重新启动
Visual Studio
?不幸的是,它没有帮助取消它我有以下错误“NotifyPropertyWeaverMsBuildTask.WeavingTask“无法从程序集D:\БщщщПщааааааааааааа。无法加载文件或程序集的file:///D:\“十五个\Tools\NotifyPropertyWeaverMsBuildTask.dll”或其依赖项之一。Не удается найти указанный файл. 确认声明正确,程序集及其所有依赖项都可用,并且任务包含实现Microsoft.Build.Framework.ITask的公共类。是否尝试重新启动Visual Studio
?
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Animation;
namespace Fifteen
{
public class Cell : Control
{
static Cell()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(Cell), new
FrameworkPropertyMetadata(typeof(Cell)));
}
}
}