ContentControl - 문자열, UIElement와 같은 단일 콘텐츠를 화면에 표시하는 컨트롤 |
ContentControl의 사용 방법 <UserControl x:Class="RiaContent.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"> <ContentControl Content="SilverLight"></ContentControl> </Grid> </UserControl> |
ContentControl 두번째 사용 방법
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"> <ContentControl> <ContentControl.Content> <Canvas> <Canvas.Children> <Rectangle Canvas.Left="0" Canvas.Top="0" Width="200" Height="100" Fill="silver" RadiusX="15" RadiusY="15"> </Rectangle> <TextBlock Text="SilverLight" </Canvas.Children> </Canvas> </ContentControl.Content> </ContentControl> </Grid> </UserControl> |
'.Net Project > SilverLight 3.0' 카테고리의 다른 글
36장) Repeat Button 컨트롤(Delay, Interval) (0) | 2009.11.27 |
---|---|
35장) Button 컨트롤(Hover, Press, Release) (0) | 2009.11.27 |
33장) 실버라이트 텍스트 컨트롤(TextBlock, TextBox, PasswordBox) (0) | 2009.11.27 |
32장) 실버라이트 3D Perspective (2) | 2009.11.27 |
31장) 실버라이트 2D Transform Group (Transform Group) (0) | 2009.11.27 |