Пользовательский заставки Silverlight проблема с заставкой - PullRequest
0 голосов
/ 07 марта 2011

Я создал простой заставки с помощью Blend, а затем скопировал содержимое в 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. Другими словами, я не смогу использовать фигуры на заставке?

Заранее спасибо:)

1 Ответ

1 голос
/ 05 апреля 2011

В этом видео упоминается, что вы можете использовать только те функции, которые являются частью основной среды выполнения Silverlight. Я предполагаю, что в этом проблема.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...