`
gstarwd
  • 浏览: 1536578 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

CoverFlow – built using Silverlight 3's 'Projection' feature

阅读更多

CoverFlow – built using Silverlight 3's 'Projection' feature

 

So I decided to have a go at building the coverflow experience using the new Silverlight 3 “Projection” feature.

If you want any of your SL3 content to look like it’s in 3D then the “Projection ” feature is your friend. It’s not true 3D, like what we’d expect from WPF camera/viewport, BUT it is sufficient to give the appearance of 3D.

What I also want to do in this sample is utilize designer created storyboards for ALL animations. It’s easy with something like coverflow to create your animations using code generated storyboards and/or dispatcher timers. These code generated storyboards or dispatcher timers are very DESIGNER UN-FRIENDLY, and this is something I try to steer clear of. I want to show you that you can create these complex types of experiences using “designer” friendly techniques.

What we’re going to build

We are going to build a very very simplified version of the infamous coverflow. The below picture is taken from the iTunes store, we are going to build something similar but without the scrollbar (that will be added in a future blog post). Also my version will have the covers tilted on a more exaggerated angle to highlight the ease at which you can do it using the blend tools.

 http://farm4.static.flickr.com/3659/3524282252_22fe9bf3c6_o.jpg]

Future blog post’s will work off this sample BUT for now it will be lean and clean, showing only the perspective transform and use of designer friendly storyboards.

So here is the final looking coverflow that we are going to build as mentioned it is a very vanilla version without the bells and whistles found in the iTunes version (like reflection or fading gradients etc). It’s only a youTube clip in case you haven’t installed SL3 and thus can’t play with it. (If you do want to play with the Silverlight 3 version then go to the bottom of this post.)

 

<object width="500" height="400"> <param name="movie" value="http://www.youtube.com/v/-Vgb7HhCWqQ&amp;hl=en&amp;fs=1"> <param name="allowFullScreen" value="true"> <param name="allowscriptaccess" value="always"> <embed type="application/x-shockwave-flash" width="500" height="400" src="http://www.youtube.com/v/-Vgb7HhCWqQ&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object>

 

My interpretation of a CoverFlow solution

This is my own interpretation of how a coverflow system can work. The beauty of programming is that there are many ways to solve the same problem, each developer/designer has there own techniques and seeing all the different approaches to problems makes programming interesting.

Don’t get too bogged down in the pictures, hopefully the code will make more sense.

My interpretation of a coverflow solution using silverlight

The visual tree hierarchy of the coverflow application is as follows

- Main Page (MainPage.xaml & cs)

                --> CoverFlow (CoverFlow.xaml & cs)

                                 --> Cover (Cover.xaml & cs)

                                 --> Cover (Cover.xaml & cs)

                                 --> Cover (Cover.xaml & cs)

                                 --> Cover (Cover.xaml & cs)

                                 --> …… etc.

The “Main Page ” is nothing more than a simple user-control that hosts the coverflow control. In the main page we also create the dummy data and pass that into the coverflow control.

The “CoverFlow ” control is a canvas container that hosts all the covers. Note that the canvas is horizontally and vertically aligned to the centre, and it has no set width (i.e. it is zero in width). This ensures that the canvas is aligned to the centre of the screen and all the covers that will be added to it will position from the centre outwards (this is an important point to remember).

CoverFlow control

 

The “Cover ” control is very simple in design. It has 3 storyboards that animate an image between the three different views mentioned above (Left, Normal, Right). They’re just storyboards for this sample however in a future blog post they will be turned into visual states as i wanted to keep this demo as simple as possible.

 Cover Control

 

Silverlight 3 Demo

[demo uses Silverlight 3 beta]

 

 

Conclusion

I’ve tried to keep the overall design of the solution as simple as possible, the reflections, iTunes like effects etc were intentionally not added as I wanted to just concentrate on “Projection” and “Using designer friendly storyboards”.

I’ve seen a lot of implementations of coverflow both within Silverlight and from the Flash side and all of them have been built mainly using code generated animations. I have no problems with that approach as long as you somehow expose those animations to a designer for them to tweak and customize.

Blend 3 “behaviours” is one such technology that will allow you to keep your code generated animations (storyboards) but bubble up the important bits for a designer to be able to configure. Bare this in mind when you create your future coverflow like experiences.

There will be a couple of follow up posts on this coverflow application, I plan on showing you how to create this same coverflow experience using the Scroll Viewer, and/or via using the other layout controls. I choose to do using a canvas for this first version to keep it simple.

Silverlight 3 projection makes building 3D like experiences dead simple. And the animation engine within Silverlight is so simple to implement that it lets you concentrate on the important things like getting the experience right!

Enjoy and if you’ve got any questions feel free to look me up on Twitter @ JoseFajardo .

分享到:
评论

相关推荐

    Feature extraction using maximum nonparametric margin projection

    Feature extraction using maximum nonparametric margin projection

    cover Flow

    3. **镜像与倒影(Mirroring & Reflection)**:为了模拟Cover Flow中的倒影效果,通常需要创建一个翻转的纹理,并将其放置在原图下方,形成水面反射般的视觉效果。 4. **视口与投影(Viewport & Projection)**:...

    3D投射 silverlight 3D投射

    在IT领域,Silverlight是一种由微软开发的网络插件,用于在Web浏览器中创建丰富的交互式用户界面,尤其是在多媒体和图形方面。它支持2D和3D图形渲染,使得开发者可以构建具有高度视觉吸引力的应用程序。本文将深入...

    Three-dimensional catadioptric vision sensor using omnidirectional dot matrix projection

    we develop a three-dimensional catadioptric vision sensor using 20 to 100 lasers arranged in a circular array called omnidirectional dot maxtric projection (ODMP). Based on the imaging characteristic...

    GEE Projection The CRS of a map projection could not be parsed

    GEE错误:Error: Projection: The CRS of a map projection could not be parsed. (Error code: 3) 我正在尝试在 Albers 等积投影 ( https://code.earthengine.google.com/ccab6721def78c24dc2a0e079866a6fe ) 中...

    3DMAX几何投影插件Geometry Projection

    3DMAX几何投影插件Geometry Projection是一款强大的工具,专为3D Max用户设计,用于增强其在3D建模过程中的工作效率和精确性。这款插件允许用户将一个或多个对象,甚至仅是对象的选定顶点,按照全球或局部坐标轴进行...

    Adaptive Feature Projection With Distribution Alignment for Deep

    Adaptive Feature Projection With Distribution Alignment for Deep IMVC Incomplete Multi-View Clustering

    MediaProjection实现截屏

    在Android系统中,从5.0(API级别21)开始,谷歌引入了一种新的API——MediaProjection,用于实现屏幕捕获和录制功能。MediaProjection API使得应用可以在用户许可的前提下,进行系统的屏幕截图和录屏操作,这为...

    Fast Principal Component Extraction Using Givens Rotations

    ### Fast Principal Component Extraction Using Givens Rotations #### 摘要与背景 本文献介绍了一种基于Givens旋转的快速主成分提取方法。该方法改进了正交投影逼近和子空间跟踪(Orthogonal Projection ...

    前端项目-d3-geo-projection.zip

    **前端项目-d3-geo-projection.zip** 是一个与前端开发相关的压缩包,重点在于它包含了一个使用 **d3.js** 扩展的地理投影库。这个库是为了解决在网页上绘制地理数据时,如何将地球表面的地理位置转换为二维平面图形...

    -3D-Projection_C#3D曲线绘制_

    3. **3D曲线表示**:3D曲线通常通过参数方程表示,其中每个维度(X, Y, Z)都是一个变量t的函数。例如,(x(t), y(t), z(t)),t在一定范围内变化。 4. **3D投影**:在2D屏幕上显示3D对象时,需要进行投影操作。常见...

    3D Cone beam CT (CBCT) projection backprojection FDK

    利用matlab进行FDK算法重建,最后得出结果,各个方向上的数据,FDK算法主要分为三步:第一步是对投影数据进行加权,第二步是对加权后的数据进行滤波,第三步是对滤波后的数据进行反投影,最后得到重建数据。

    Matlab code to reconstruct using simple back projection

    3. **MATLAB实现流程**: - **读取数据**:MATLAB程序首先读取CT扫描的投影数据,这通常是一个二维数组,代表不同角度下的投影值。 - **预处理**:对数据进行必要的归一化和校准,以确保其在合适的范围内。 - **...

    High-Speed 3D Imaging with Digital Fringe Projection Techniques

    数字条纹投影技术(Digital Fringe Projection Techniques, DFPT)作为其中的一种重要方法,因其高精度、非接触测量等优点而备受关注。本文将详细介绍数字条纹投影技术的基本原理、关键技术及应用领域,并探讨其在...

    Silverlight4

    ### Silverlight 4 技术特性概述 #### 引言 Silverlight 4 是微软推出的一款跨浏览器、跨平台的应用程序框架,它为开发者提供了创建丰富互联网应用(RIA)的能力。Silverlight 4 在前一版本的基础上进行了大量改进...

    Projection

    "Projection"一词在IT行业中通常指的是投影或映射的概念,尤其在计算机图形学、数据库设计、软件工程以及数据科学等领域有广泛的应用。在这里,我们分别从这些领域来详细探讨"Projection"的相关知识点。 首先,在...

    projection

    3. 可能还有CSS文件,用于样式控制和布局设计。 4. 数据文件,如GeoJSON或Shapefile,存储地理边界或特征信息。 5. 可能还有其他辅助资源,如图片、图标或者地图瓦片。 开发者在实现这个作业时,需要对GIS理论有...

    Android MediaProjection截屏&amp;录屏-适配Android

    Android MediaProjection截屏&录屏 1、解决Android Q中java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION 异常 2、...

    Android MediaProjection 录屏H264流或者保存为MP4视频

    在Android平台上,MediaProjection API是实现屏幕录制的关键技术。它允许应用捕获设备的屏幕内容,然后将其编码为H264流或者保存为MP4视频文件。在本篇文章中,我们将深入探讨如何使用Android MediaProjection API...

Global site tag (gtag.js) - Google Analytics