블로그 이미지
Magic_kit
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
반응형

Category

Recent Post

Recent Comment

Archive

2009. 11. 26. 13:39 .Net Project/SilverLight 3.0
반응형
RiaMediaElement


미디어 동영상 화면 처리
 
 

<UserControl x:Class="RiaMediaElement.MainPage"

    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:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">

        <StackPanel>

            <MediaElement

                x:Name="myVideo" Source="Video/Silverlight.wmv"

                AutoPlay="False" IsMuted="False">

            </MediaElement>

            <StackPanel Orientation="Horizontal">

                <Button x:Name="btnStart" Content="재생"></Button>

                <Button x:Name="btnStop" Content="중지"></Button>

            </StackPanel>

        </StackPanel>   

    </Grid>

</UserControl> 

 using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Shapes;

 

namespace RiaMediaElement

{

    public partial class MainPage : UserControl

    {

        public MainPage()

        {

            InitializeComponent();

 

            btnStart.Click += new RoutedEventHandler(btnStart_Click);

            btnStop.Click += new RoutedEventHandler(btnStop_Click);

        }

 

        void btnStop_Click(object sender, RoutedEventArgs e)

        {

            myVideo.Stop(); // 중지
        }

 

        void btnStart_Click(object sender, RoutedEventArgs e)

        {

            //myVideo.AutoPlay = true;

            myVideo.Play(); // 재생

        }

    }

} 





반응형
posted by Magic_kit
2009. 11. 26. 13:35 .Net Project/SilverLight 3.0
반응형
- Images
  Image, ImageBrush 객체를 사용하여 이미지 삽입


- Images 화면 표시
   
 

<UserControl x:Class="RiaImage.MainPage"

    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:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="Silver" Height="300" Width="400">

       

        <Image Source="/RiaImage;component/images/img.jpg" Margin="30"

            Stretch="UniformToFill"></Image>   

    </Grid>

</UserControl> 




반응형
posted by Magic_kit
2009. 11. 25. 16:54 .Net Project/SilverLight 3.0
반응형
- 클릭시 이벤트 발생하며 현재 시간이 출력 완료 된다 

 
 

<UserControl x:Class="RiaDeploy.MainPage"

    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:DesignHeight="300" d:DesignWidth="400">

 

    <Grid x:Name="LayoutRoot" Background="White">

           

        <StackPanel Grid.ColumnSpan="2">

            <TextBlock x:Name="lblTitle" FontSize="20" Text=""></TextBlock>   

            <Button x:Name="btnClick"
                  
 Height="30" Width="50"
                  
 Click="btnClick_Click_1" Content="Click"></Button>

        </StackPanel> 

    </Grid>

</UserControl> 

 Event.Cs
 using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Shapes;

 

namespace RiaDeploy

{

    public partial class MainPage : UserControl

    {

        public MainPage()

        {

            InitializeComponent();

            btnClick.Click += new RoutedEventHandler(btnClick_Click);       

        }

 

        void btnClick_Click(object sender, RoutedEventArgs e)

        {

            this.lblTitle.Text = DateTime.Today.ToShortTimeString();

        }

 

        private void btnClick_Click_1(object sender, RoutedEventArgs e)

        {

 

        }

    }

} 






반응형
posted by Magic_kit
2009. 11. 25. 16:43 .Net Project/SilverLight 3.0
반응형
 - Border 테두리 
 

<UserControl x:Class="RiaBorder.MainPage"

    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:DesignHeight="300" d:DesignWidth="400">

 

    <Grid x:Name="LayoutRoot" Background="White" Width="300" Height="300">

        <Border BorderBrush="Lavender" BorderThickness="10" CornerRadius="30">

            <StackPanel Background="DarkGreen">

                 <Button Content="BorderTickness" FontSize="20"></Button>

                 <Button Content="CornerRadius" FontSize="20"></Button>

            </StackPanel>                      

        </Border>

    </Grid>

</UserControl> 




반응형
posted by Magic_kit