私は基本的に次のコードセットを動的に/プログラム的に作成しようとしていますが、その方法はわかりません。ここでグリッドにボタンとシルバーライトのプレーヤーを動的に追加しますか?
<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から継承したクラスがある場合、SMFPlayerの代わりにこの子クラスをxmlns:...を使用するように指定する方法はありますか? – Neykho
@Neykho、はい。 SMFPlayerから継承したクラスへの名前空間パスを知る必要があります。次に、新しいxmlnsを追加するか、xlmns:smfを変更して新しいパスを使用します。 xmlns:name = "clr-namespace:TypicalThisIsNameOfYourProject.RestOfTheNamespacePath" ' – ShawnFeatherly