标签: effects

如何设置DropShadowEffect的不透明度?

我有一个带边框的WPF项目使用以下样式.计划是当鼠标移过边界时使发光效果淡入淡出,并在离开时淡出淡出效果.

<Style x:Key="BorderGlow" TargetType="Border">
    <Style.Resources>
        <Storyboard x:Key="GlowOn">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(DropShadowEffect.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="GlowOff">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(DropShadowEffect.Opacity)">
                <SplineDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Style.Resources>

    <Setter Property="CornerRadius" Value="6,1,6,1" />
    <Setter Property="BorderBrush" Value="{StaticResource SelectedBorder}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Background" Value="{StaticResource DeselectedBackground}" />
    <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
    <Setter Property="TextBlock.Foreground" Value="{StaticResource SelectedForeground}" />

    <Setter Property="RenderTransform">
        <Setter.Value>
            <RotateTransform Angle="90"/>
        </Setter.Value>
    </Setter>

    <Setter Property="Effect">
        <Setter.Value>
            <DropShadowEffect ShadowDepth="0" BlurRadius="8" Color="#FFB0E9EF"/>
        </Setter.Value>
    </Setter>

    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">

            <Trigger.EnterActions>
                <BeginStoryboard Storyboard="{StaticResource GlowOn}"/>
            </Trigger.EnterActions>

            <Trigger.ExitActions>
                <BeginStoryboard …
Run Code Online (Sandbox Code Playgroud)

wpf animation effects opacity storyboard

6
推荐指数
1
解决办法
1万
查看次数

Windows Phone 7中的效果(DropShadowEffect)

我注意到Silverlight for Windows Phone 7中缺少Effect Property,所​​以我做了一些谷歌搜索,并且由于性能原因,它显然被删除了.我基本上想做这样的事情

<TextBlock ...>
    <TextBlock.Effect>
        <DropShadowEffect/>
    </TextBlock.Effect>
</TextBlock>
Run Code Online (Sandbox Code Playgroud)

<Image ...>
    <Image.Effect>
        <DropShadowEffect/>
    </Image.Effect>
</Image>
Run Code Online (Sandbox Code Playgroud)

那么有没有其他方法来获得DropShadowEffectSilverlight for Windows Phone 7?有没有新闻,如果它将在下一个版本中?

谢谢

c# silverlight xaml effects windows-phone-7

6
推荐指数
2
解决办法
5802
查看次数

如何在Android Camera Preview中创建Lomo/Retro效果?

从Android 2.0开始,相机API支持少量ColorEffect.

这个列表可以在这里找到,从Effect Aqua开始. http://developer.android.com/reference/android/hardware/Camera.Parameters.html#EFFECT_AQUA

效果可以实现如下:

Camera.Parameters parameters = camera.getParameters();
parameters.setColorEffect(Camera.Parameters.EFFECT_AQUA);
camera.setParameters(parameters);
Run Code Online (Sandbox Code Playgroud)

除了那些支持的效果,我想在我的应用程序中引入Lomo或Retro效果.任何人都可以提供一些如何为相机预览提供额外效果的指导?

代码示例将不胜感激.

谢谢.

android effects filter android-camera

6
推荐指数
1
解决办法
5619
查看次数

FireMonkey over VNC和远程桌面的问题

设置:在Windows 64位和Windows 32位上使用Delphi FireMonkey(object pascal)应用程序编写的可执行本机应用程序.可执行文件通过VNC从虚拟机运行,通常从Ubuntu Linux机器运行到运行可执行文件的虚拟Windows 7配置.

问题:问题是当显示带效果的图像(TImage)(TMonochromeEvent,TShadowEffect)时,图像不会显示在VNC连接中.更改效果有时会渲染图像,有时它会闪烁一秒钟然后消失.

自定义样式的TListItem也是如此.在本地运行时,它们在Windows 7,32位和64位Windows 8上显示正常,并按预期工作.

会欣赏想法和评论!:-) 谢谢.

delphi vnc effects virtual-machine firemonkey

6
推荐指数
1
解决办法
636
查看次数

创建降雨效果/水滴的算法?

无论使用何种语言,创造降雨效果或水滴的原理是什么?我在Flash中看到了一些令人印象深刻的雨水效果,但它实际上是如何工作的?

雨效果示例

雨滴水效果示例

algorithm effects

5
推荐指数
1
解决办法
3921
查看次数

jQuery的fadeIn()和fadeOut()不能与IE 8一起使用吗?

我有一个页面fadeIn和fadeOut内联元素和jQuery不起作用.然后当我将开发人员工具更改为使用IE 7的浏览器模式时,则会显示fadeIn()和fadeOut()效果.

jquery effects internet-explorer-8

5
推荐指数
1
解决办法
1986
查看次数

Android - 如何在iphone中创建像删除一样的摇动效果?

我有gridView,有很多图像,点击编辑按钮,我希望图像摆动就像:如何创建iPhone的摇摆图标效果?.感谢任何指针来解决这个问题.

animation android effects

5
推荐指数
1
解决办法
1571
查看次数

DragDropEffects.Copy和DragDropEffects.Move有什么区别?

我已经在互联网上寻找这个问题的答案,我似乎无法找到它.

DragDropEffects.Copy和DragDropEffects.Move有什么区别?

在我的DragEnter代码中,我将其设置为:

private void Canvas_DragEnter(object sender, DragEventArgs e)
    {
        if (e.Data.GetDataPresent(DataFormats.FileDrop))
            e.Effect = DragDropEffects.Move;
    }
Run Code Online (Sandbox Code Playgroud)

但是,如果我使用

private void Canvas_DragEnter(object sender, DragEventArgs e)
    {
        if (e.Data.GetDataPresent(DataFormats.FileDrop))
            e.Effect = DragDropEffects.Copy;
    }
Run Code Online (Sandbox Code Playgroud)

该计划没有任何区别.

有人可以解释一下这个区别吗?

c# drag-and-drop copy move effects

5
推荐指数
2
解决办法
4663
查看次数

设置 kivyscrollvieweffects_cls 属性的正确方法是什么?

我想阻止用户过度滚动。kivy doc说effects_cls属性会改变这种行为,但我还没有找到让它发挥作用的方法。

effects scrollview kivy kivy-language

5
推荐指数
1
解决办法
2573
查看次数

以角度调度动作的正确方法是什么?

你能告诉我发送动作的正确方法是什么吗?

在组件中,我们喜欢使用storeusing store.dispatchthan action。

onLoginButtonClick(user: Authenticate) {
    this.store.dispatch(new Authctions.Login(user));
  }
Run Code Online (Sandbox Code Playgroud)

现在使用ngEffect我们调度动作而不使用store只使用new Action name为什么?

export class AuthEffect {
  @Effect()
  login$ = this.actions$.pipe(
    ofType(AuthActionsTypes.LOGIN),
    map((action: Login) => action.payload),
    switchMap((auth: Authenticate) => {
      return this.authService.login(auth).pipe(
        map(user => new LoginSuccess({user})),
        catchError(error => of(new LoginFailure(error)))
      );
    })
  );
Run Code Online (Sandbox Code Playgroud)

为什么它是这样使用的

 new LoginSuccess({user})
Run Code Online (Sandbox Code Playgroud)

我们可以这样使用this.store.dispatch( new LoginSuccess({user}))吗?实际上?

任何更新?

effects ngrx ngrx-effects angular ngrx-store

5
推荐指数
1
解决办法
6630
查看次数