34장) 단일항목을 표시하는 컨트롤 (ContentControl)
![]() - 문자열, UIElement와 같은 단일 콘텐츠를 화면에 표시하는 컨트롤 |
![]() <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> |
![]()
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> |