기본적으로 다음 코드 집합을 동적/프로그래밍 방식으로 만들려고 시도하고 있지만이를 수행하는 방법을 잘 모르겠습니다.격자에 버튼과 실버 라이트 플레이어를 동적으로 추가 하시겠습니까?
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<smf:SMFPlayer x:Name="player" Grid.Row="0" AutoPlay="False">
<smf:SMFPlayer.Playlist>
<media:PlaylistItem
DeliveryMethod="AdaptiveStreaming"
MediaSource="http://video3.smoothhd.com.edgesuite.net/ondemand/Big%20Buck%20Bunny%20Adaptive.ism/Manifest"/>
<media:PlaylistItem
DeliveryMethod="AdaptiveStreaming"
SelectedCaptionStreamName="textstream_eng"
MediaSource="http://streams.smooth.vertigo.com/elephantsdream/Elephants_Dream_1024-h264-st-aac.ism/manifest"/>
</smf:SMFPlayer.Playlist>
</smf:SMFPlayer>
<StackPanel Grid.Row="1" Orientation="Horizontal" Background="Transparent">
<Button x:Name="test1" Height="30" Width="70" Content="Test 1"/>
<Button x:Name="test2" Height="30" Width="70" Content="Test 2"/>
</StackPanel>
</Grid>
는 여기 정적으로 보이는 방법은 다음과 같습니다 http://i.imgur.com/uz1O8.png
감사합니다!
SMFPlayer에서 상속 된 클래스가있는 경우 xmlns : ...를 통해 SMFPlayer 대신이 자식 클래스를 사용하도록 지정하는 방법이 있습니까? – Neykho
@Neykho, 네. SMFPlayer에서 상속 한 클래스의 네임 스페이스 경로를 알아야합니다. 그런 다음 새 xmlns를 추가하거나 xlmns : smf를 변경하여 새 경로를 사용하십시오. 즉'xmlns : name = "clr-namespace : 일반적으로 ThisIsNameOfYourProject.RestOfTheNamespacePath"' – ShawnFeatherly