[MainPage.xaml]


<UserControl x:Class="RiaOutOfBrowser.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">

        <Button x:Name="btnClock" Content="현재시간"></Button>

    </Grid>

</UserControl>

 

 




[MainPage.xaml.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 RiaOutOfBrowser

{

    public partial class MainPage : UserControl

    {

        public MainPage()

        {

            InitializeComponent();

 

            btnClock.Click += new RoutedEventHandler(btnClock_Click);

        }

 

        void btnClock_Click(object sender, RoutedEventArgs e)

        {

            MessageBox.Show(DateTime.Now.ToString(), "현재시간", MessageBoxButton.OK);

 

        }

    }

}

 

 







'솔루션 탐색기'에서 "해당 프로젝트에 마우스 우클릭 - 속성(Properties)"창 들어가서 아래와 같이 체크하고 다시빌드하기












"속성창" 위의 그림과 같이 설정하고 '다시빌드'한 후 아래그림과 같이 실행한다.











--> '바탕화면'에 바로가기가 설치된 화면.












--> OOB설정한 것을 삭제하고 싶으면 아래 그림과 같이 하면된다.(삭제가 쉽다.)
















'.NET프로그래밍 > Silverlight 3.0' 카테고리의 다른 글

Navigation Application  (0) 2009.12.08
다중 페이지 구성  (0) 2009.12.08
Image Deep Zoom  (0) 2009.12.07
Effect (효과)  (0) 2009.12.07
MouseDragElementBehavior  (0) 2009.12.07
Posted by holland14
: