'실버라이트'에 해당되는 글 6건
- 2009/07/21 Silverlight - Animation
- 2009/07/20 Silverlight - Media Player Sample (2)
- 2008/05/28 Programming Silverlight with JavaScript
- 2008/02/13 Silver light와 Flickr 를 이용한 Image 슬라이드
- 2007/06/02 Microsoft Silverlight WPF/E를 한눈에 보여주는 동영상
- 2007/04/29 SilverLight & Flex in WEB 2.0
Silverlight는 애니메이션을 위해 Storyboard를 사용한다.
뭐 Flash와 같은 다른 app.도 마찬가지겠지만 시간에 따라 벡터의 변화를 처리하는 방식이다.
이번 내용은 에제는 포함하지 않겠지만 팁에 해당하는 StoryBoard의 특성값들에 대해 알아본다.
<Storyboard x:Name="TestStoryBoard" FillBehavior="Stop">
애니메이션이 완료 되었을 때 동작을 지정한다.
- HoldEnd(기본값) : 완료 후 오브젝트의 상태 그대로 유지
- Stop : 완료 후 초기 위치로 복원
<Storyboard x:Name="TestStoryBoard" AutoReverse="True">
재생이 완료 되었을 때 원자리로 역 애니메이션으로 돌아온다.
<Storyboard x:Name="TestStoryBoard" SpeedRatio="5.0">
배율로 속도를 지정한다. 위와 같은 경우 평상 속도의 5배로 재생된다.
<Storyboard x:Name="TestStoryBoard" RepeatBehavior="3x">
3회 반복한다. #x를 지정하면 재생 횟수를 지정할 수 있다.
<Storyboard x:Name="TestStoryBoard" RepeatBehavior="Forever">
무한 반복한다.
<Storyboard x:Name="TestStoryBoard" RepeatBehavior="00:00:05.5">
시간을 설정하여 얼마간 재생할지 결정한다.
위 설정은 5.5초
'.NET > Silverlight' 카테고리의 다른 글
| Silverlight - Animation (0) | 2009/07/21 |
|---|---|
| Silverlight - Media Player Sample (2) | 2009/07/20 |
| Silverlight + Expression = Visual Kitchen (0) | 2009/07/16 |
| Silverlight - Network Sample 2 (0) | 2009/07/15 |
| Silverlight - Network Example 1 (0) | 2009/07/13 |
| Silverlight – Custom control (0) | 2009/07/03 |
자료제공 : http://hugeflow.com/
예제소스 :
Silverlight 에서는 정말 쉽게 미디어 플레이어를 만들 수 있는 것 같다.
먼저 silverlight 프로젝트를 하나 만들고, Page.xaml을 blend로 열어준다.
blend에서 asset에 MediaControl 하나를 올려주고 버튼들을 올려 간단히 media 재생에 대한 내용을 작성해보자.
먼저 xaml
<UserControl x:Class="WebClientMediaTest.Page"
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" mc:Ignorable="d" d:DesignWidth="478" d:DesignHeight="337">
<Grid x:Name="LayoutRoot" Background="White">
<MediaElement Margin="0.39,0,-0.39,37" Source="http://hugeflow.com/Metro/Video/pigmap.wmv" x:Name="media"/>
<StackPanel Height="33" Margin="0.39,0,0,0" VerticalAlignment="Bottom" Orientation="Horizontal">
<Button Content="Play" Width="82.333" x:Name="btnPlay" Click="btnPlay_Click"/>
<Button Content="Pause" Width="82.333" x:Name="btnPause" Click="btnPause_Click"/>
<Button Content="Stop" Width="82.333" x:Name="btnStop" Click="btnStop_Click"/>
<Slider Width="216" x:Name="slideVolume" ValueChanged="slideVolume_ValueChanged"/>
</StackPanel>
</Grid>
</UserControl>
다음은 C# 코드
다른 코드들 보다 어쩌먼 정말 간단한 코드같다 -_ -;;using System.Windows;
using System.Windows.Controls;namespace WebClientMediaTest
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();Loaded += new RoutedEventHandler(Page_Loaded);
}void Page_Loaded(object sender, RoutedEventArgs e)
{
slideVolume.Value = slideVolume.Maximum * media.Volume;
}private void btnPlay_Click(object sender, RoutedEventArgs e)
{
media.Play();
}private void btnPause_Click(object sender, RoutedEventArgs e)
{
media.Pause();
}private void btnStop_Click(object sender, RoutedEventArgs e)
{
media.Stop();
}private void slideVolume_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
media.Volume = slideVolume.Value / slideVolume.Maximum;
}
}
}
별다른 기법도 없고, 단지 컨트롤 에서 제공하는 간단한 산수만 한다면 사용할 수 있는..
'.NET > Silverlight' 카테고리의 다른 글
| Silverlight - Animation (0) | 2009/07/21 |
|---|---|
| Silverlight - Media Player Sample (2) | 2009/07/20 |
| Silverlight + Expression = Visual Kitchen (0) | 2009/07/16 |
| Silverlight - Network Sample 2 (0) | 2009/07/15 |
| Silverlight - Network Example 1 (0) | 2009/07/13 |
| Silverlight – Custom control (0) | 2009/07/03 |
Adobe Flash가 성공하기 시작한 배경은 Flash에서 웹 페이지와 통신이 가능하던 시기부터 이다.
SilverLight에서도 Flash의 역사와 마찬가지로 Javascript를 통한 통신으로 Rich Web Application으로 자리 매김하기 위한 기반 기술을 제공한다.
현재 회사(가온아이, Kaoni) 내에서도 SilverLight를 이용하여 개발을 시작하고 있고, 현재 본인이 속해있는 팀에서 SilverLight를 이용하는 방법을 활발히 연구중이다.
다음과 같이 아래 링크를 통해 SilverLight와 JavaScript와의 연동을 처리하는 예제를 한번 보도록 하자.
http://msdn.microsoft.com/en-us/library/cc500344.aspx
원문 내용
In this chapter, we’ll take an in-depth look at programming the Silverlight object and the XAML it contains using JavaScript within the browser. We’ll investigate how to host the Silver-light object in the browser, as well as the full property, method, and event model that the control supports. We’ll also look at how to support loading and error events on the control, as well as how to handle parameterization and context for the control. You’ll see how Silverlight provides a default error handler and how you can override this with your own error handlers. You’ll delve into the Downloader object that is exposed by Silverlight, and how this can be used to dynamically add content to your application. Finally, we’ll explore the programming model for the user interface (UI) elements that make up the XAML control model, and you will learn how you can use the methods and events that they expose from within the Java-Script programming model.
http://msdn.microsoft.com/en-us/library/cc500343.aspx
http://msdn.microsoft.com/en-us/library/cc500345.aspx
http://msdn.microsoft.com/en-us/library/cc500351.aspx
http://msdn.microsoft.com/en-us/library/cc500385.aspx
http://msdn.microsoft.com/en-us/library/cc500386.aspx
'.NET > Silverlight' 카테고리의 다른 글
| Silverlight domain access control (0) | 2009/04/28 |
|---|---|
| REMIX08 RIA, UX의 세계 (0) | 2008/06/16 |
| Programming Silverlight with JavaScript (0) | 2008/05/28 |
| Silver light와 Flickr 를 이용한 Image 슬라이드 (0) | 2008/02/13 |
| Silverlight와 Windows Live Open API Service의 연동 (0) | 2008/02/12 |
| WPF/E Silverlight를 이용한 간단한 예제 (0) | 2007/09/02 |
김선우 [오전 11:38]:
http://blogs.msdn.com/mswanson/archive/2007/12/18/silverlight-slide-show.aspx
이거 바바
저거 소스 못구하나?
아 소스 있네
http://www.codeplex.com/SlideShow
화질 죽이네 silverlight로 하니깐
권지원 [오전 11:39]:
헐
김선우 [오전 11:39]:
저거 소스좀 까바
웹서비스로
플리커 에 접속해서
이미지 가져오네
저거 좋지?
대화에 첫번째 주소에 가시면 실버라이트 슬라이드 쇼를 보여주는 실버라이트가 있죠.
소스는 두번째 주소인 Codeplex에 있습니다.
간만에 재밌는 장난감거리 생겼네요 ㅋㅋ
'.NET > Silverlight' 카테고리의 다른 글
| REMIX08 RIA, UX의 세계 (0) | 2008/06/16 |
|---|---|
| Programming Silverlight with JavaScript (0) | 2008/05/28 |
| Silver light와 Flickr 를 이용한 Image 슬라이드 (0) | 2008/02/13 |
| Silverlight와 Windows Live Open API Service의 연동 (0) | 2008/02/12 |
| WPF/E Silverlight를 이용한 간단한 예제 (0) | 2007/09/02 |
| [Silverlight] QuickStarts, HTTP를 통한 Plain XML 수신 (0) | 2007/07/30 |
어도비의 플렉스도 오픈소스로 전환이 된다고하니
앞으로 WEB 2.0 기반의 디자인적인 측면의 향상이 심히 기대가 크네요.
지금도 전쟁같은 WEB 2.0의 기술들의 변화가 난무한데
더더욱 큰 변화가 눈앞에 보입니다. ^ ^
한편으로 두렵지만
한편으로는 두근두근 거리고 신나네요.
전 이상하게 배울게 많다는 것을 느낄때 신나고 두근거리네요~
'Web > AJAX' 카테고리의 다른 글
| ASP.NET에서 사용할 정말 편한 Ajax Library (2) | 2007/08/18 |
|---|---|
| Ajax Pattern (0) | 2007/08/08 |
| Ajax DOM 제어 (0) | 2007/07/08 |
| Ajax를 통해 특정영역에 페이지 로드 (0) | 2007/07/05 |
| Javascript Library in Ajax (0) | 2007/04/29 |
| SilverLight & Flex in WEB 2.0 (0) | 2007/04/29 |

3-3.WebClientMediaTest.zip


Prev




