zoukankan      html  css  js  c++  java
  • Silverlight 动画性能

    通过几个配置可以提高动画性能:

    Desired Frame Rate

    在WEB项目中配置:

    <div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2,"
    type="application/x-silverlight-2" width="100%" height="100%">
    <param name="maxFramerate" value="15" />
    ...
    </object>
    <iframe style="visibility:hidden;height:0;0;border:0px"></iframe>
    </div>

    Hardware Acceleration

    <object data="data:application/x-silverlight-2,"
    type="application/x-silverlight-2" width="100%" height="100%">
    <param name="enableGPUAcceleration" value="true" />
    <param name="enableCacheVisualization" value="true" />
    <param name="enableFrameRateCounter" value="true" />

    Bitmap Caching

         <Canvas>
                <Image x:Name="img" Source="phone_booth.jpg" Stretch="None"
    CacheMode="BitmapCache">
                    <Image.RenderTransform>
                        <RotateTransform x:Name="rotateTransform"></RotateTransform>
                    </Image.RenderTransform>
                </Image>
                <Button x:Name="cmd" Content="I GROW and SHRINK." Canvas.Top="70" Canvas.Left="10"
    CacheMode="BitmapCache">
                    <Button.RenderTransform>
                        <ScaleTransform x:Name="scaleTransform"></ScaleTransform>
                    </Button.RenderTransform>
                </Button>
            </Canvas>

    动画对象还要设置

    <Button x:Name="cmd" Content="I GROW and SHRINK." Canvas.Top="70" Canvas.Left="10">
    <Button.CacheMode>
    <BitmapCache RenderAtScale="5"></BitmapCache>
    </Button.CacheMode>
    <Button.RenderTransform>
    <ScaleTransform x:Name="scaleTransform"></ScaleTransform>
    </Button.RenderTransform>
    </Button>
  • 相关阅读:
    TPL中的异常
    异步接口
    TPL高级探秘
    TPL应用:HttpClient
    WLS_Oracle Weblogic部署应用程序(案例)
    WLS_Oracle Weblogic服务器生命周期(案例)
    WLS_Oracle Weblogic使用WLST工具(案例)
    WLS_Oracle Weblogic MSI和创建被管理服务器(概念)
    WLS_Oracle Weblogic配置文件(案例)
    WLS_Oracle Weblogic目录结构(案例)
  • 原文地址:https://www.cnblogs.com/Gyoung/p/3657671.html
Copyright © 2011-2022 走看看