我使用Blend创建了一个简单的启动画面,然后将内容复制到我的Web项目中的Splash.xaml中。这是xaml: -
<Grid 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:ed="http://schemas.microsoft.com/expression/2010/drawing"
d:DesignHeight="600" d:DesignWidth="800" mc:Ignorable="d">
<Grid.Resources>
<Storyboard x:Name="SplashStoryboard" RepeatBehavior="Forever" AutoReverse="True">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="90"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="180"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="270"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc1">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="180"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="270"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc1">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="270"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="360"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc2">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="270"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc2">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="360"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="90"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc3">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="90"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc3">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="90"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc4">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="90"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc4">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="90"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="180"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc5">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="180"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="270"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc5">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="270"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="360"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.StartAngle)" Storyboard.TargetName="arc7">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="180"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Arc.EndAngle)" Storyboard.TargetName="arc7">
<EasingDoubleKeyFrame KeyTime="0:0:1.6" Value="360"/>
<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="180"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Grid.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<Image Source="ServerImages/Orange.jpg" Stretch="Fill"/>
<ed:Arc x:Name="arc" ArcThickness="0" ArcThicknessUnit="Pixel" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" StartAngle="0" UseLayoutRounding="False" Width="400" Height="400" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<ed:Arc x:Name="arc1" ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="180" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" StartAngle="90" UseLayoutRounding="False" Width="350" Height="350" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<ed:Arc x:Name="arc2" ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="270" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" StartAngle="180" UseLayoutRounding="False" Width="450" Height="450" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<ed:Arc x:Name="arc3" ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="360" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" StartAngle="270" UseLayoutRounding="False" Width="300" Height="300" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<ed:Arc x:Name="arc4" ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="360" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" StartAngle="270" UseLayoutRounding="False" Width="500" Height="500" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<ed:Arc x:Name="arc5" ArcThickness="0" ArcThicknessUnit="Pixel" EndAngle="180" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" StartAngle="90" UseLayoutRounding="False" Width="500" Height="500" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round"/>
<ed:Arc x:Name="arc7" ArcThickness="0" ArcThicknessUnit="Pixel" Fill="#FFF4F4F5" Margin="0" Stretch="None" Stroke="#FF811902" UseLayoutRounding="False" Width="250" Height="250" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round" EndAngle="270"/>
<TextBlock x:Name="tbProgress" Margin="0" TextWrapping="Wrap" Text="0" d:LayoutOverrides="Width, Height" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="64" FontWeight="Bold" Foreground="#FF451701"/>
</Grid>
</Grid>
然而问题是xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
无法识别,因为它位于SDK的文件夹中。我如何通过这个问题?我应该在哪里添加这个dll的引用。换句话说,我将无法在启动画面中使用形状?
提前致谢:)