TimeSpan.FromSeconds(2);
Color.FromArgb(255, 255, 0, 0);
'Silverlight > Silverlight 3' 카테고리의 다른 글
| 시간과 색상 데이터 생성, TimeSpan & Color (0) | 2009/05/12 |
|---|---|
| 코드로 만드는 애니메이션 (0) | 2009/05/12 |
| Timer 클래스 구현 (0) | 2009/05/12 |
| 마우스 Drag & Drop(드래그 엔 드롭)의 구현 (0) | 2009/05/12 |
| 시간과 색상 데이터 생성, TimeSpan & Color (0) | 2009/05/12 |
|---|---|
| 코드로 만드는 애니메이션 (0) | 2009/05/12 |
| Timer 클래스 구현 (0) | 2009/05/12 |
| 마우스 Drag & Drop(드래그 엔 드롭)의 구현 (0) | 2009/05/12 |
Create a DoubleAnimation
Create a Storyboard
Begin the Storyboard in response to an even
| 시간과 색상 데이터 생성, TimeSpan & Color (0) | 2009/05/12 |
|---|---|
| 코드로 만드는 애니메이션 (0) | 2009/05/12 |
| Timer 클래스 구현 (0) | 2009/05/12 |
| 마우스 Drag & Drop(드래그 엔 드롭)의 구현 (0) | 2009/05/12 |
MSDN 실버라이트3 레퍼런스 중 : http://msdn.microsoft.com/en-us/library/cc189084(VS.95).aspx
<Grid x:Name="LayoutRoot" Background="White">
<!-- Just a TextBlock to show the output of the timer. -->
<TextBlock Loaded="StartTimer" x:Name="myTextBlock" />
</Grid>
public void StartTimer(object o, RoutedEventArgs sender)
{
System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 100); // 100 Milliseconds
myDispatcherTimer.Tick += new EventHandler(Each_Tick);
myDispatcherTimer.Start();
}
// A variable to count with.
int i = 0;
// Raised every 100 miliseconds while the DispatcherTimer is active.
public void Each_Tick(object o, EventArgs sender)
{
myTextBlock.Text = "Count up: " + i++.ToString();
}
| 시간과 색상 데이터 생성, TimeSpan & Color (0) | 2009/05/12 |
|---|---|
| 코드로 만드는 애니메이션 (0) | 2009/05/12 |
| Timer 클래스 구현 (0) | 2009/05/12 |
| 마우스 Drag & Drop(드래그 엔 드롭)의 구현 (0) | 2009/05/12 |
MSDN Drag & Drop 샘플 : http://msdn.microsoft.com/en-us/library/cc189066(VS.96).aspx HitTest를 이용해서 오브젝트 추적 : http://nickssoftwareblog.com/2008/10/07/silverlight-20-in-examples-part-drag-and-drop-inside-out/public partial class Page : UserControl { bool isDragging = false; Point offset; // ... }void theDragon_MouseLeftButtonDown(object sender,
MouseButtonEventArgs e)
{
// Mark that we're doing a drag
isDragging = true;
// Ensure that the mouse can't leave the dragon
theDragon.CaptureMouse();
// Determine where the mouse 'grabbed'
// to use during MouseMove
offset = e.GetPosition(theDragon);
}
void theDragon_MouseMove(object sender, MouseEventArgs e)
{
if (isDragging)
{
// Where is the mouse now?
Point newPosition = e.GetPosition(LayoutRoot);
info.Text = string.Concat("Position: ",
newPosition.X,
" x ",
newPosition.Y);
// Move the dragon via the new position less the offset
theDragon.SetValue(Canvas.LeftProperty,
newPosition.X - offset.X);
theDragon.SetValue(Canvas.TopProperty,
newPosition.Y - offset.Y);
}
}
void theDragon_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (isDragging) { // Turn off Drag and Drop isDragging = false; // Free the Mouse theDragon.ReleaseMouseCapture(); } }
드래그엔드롭 매니저 : http://www.codeplex.com/silverlightdragdrop
| 시간과 색상 데이터 생성, TimeSpan & Color (0) | 2009/05/12 |
|---|---|
| 코드로 만드는 애니메이션 (0) | 2009/05/12 |
| Timer 클래스 구현 (0) | 2009/05/12 |
| 마우스 Drag & Drop(드래그 엔 드롭)의 구현 (0) | 2009/05/12 |
VisualStateManager.GoToState(FindName("myCoverStates"+i),"position"+position,true);
| 실버라이트 C#에서 eval이나 ["오브젝트 이름"] 같은 역할? (0) | 2009/05/12 |
|---|---|
| 아웃풋 창을 이용해서 디버깅 하기 : Debug와 Trace의 사용 (0) | 2009/02/09 |
| C# 함수에서 불특정 다수의 변수 받기, params 키워드 사용 (0) | 2009/01/07 |
| C#에서는 멤버변수를 필드(fields) 라고 부른다.(냉무) (0) | 2008/07/24 |
| Windows Forms Application 기초 샘플 (0) | 2008/07/22 |
| 디버그 시에 실행할 코드 처리 방법 (0) | 2008/07/12 |