을 표시하지 :XAML의 UserControl 그리드 요소는 해결되지 여전히
내가 가진 다음 문제 :
<UserControl x:Class="UserControlSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="mainGrid" ShowGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="50" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" FontSize="20">Test</TextBlock>
<Button Grid.Row="1" Grid.Column="0">Click</Button>
</Grid>
디자이너에서 :
나는 사용자 정의 컨트롤이처럼 보이는이 미리보기 창이 잘 보입니다. 눈금 선, 텍스트 블록 및 단추가 나타납니다.
창에 임베드 할 때 그리드 선만 표시되고 텍스트 나 버튼은 표시되지 않습니다. UserControl은 다음과 같이 포함됩니다.
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:my="clr-namespace:APP.NET"
Title="Window1" Height="300" Width="300">
<Grid>
<my:UserControlSettings x:Name="controlSettings"/>
</Grid>
</Window>
아무 도움이됩니다.
그 말이 올바른 힌트였습니다. 감사! – Matt