新しい画像を追加するウィンドウがあります(画像とともに)、中央にコントロールを中央に配置するだけです(縦と横の両方)。私は垂直なものだけを動かすことができます。私はDockPanel
のコンテンツを自分のCodeBehindからスワップして、スライドショーUIを開始する前にこのスタートアップ画面を表示したいと考えています。これは、コンテンツがCodeBehindから設定されていることを意味します。マイWindow
WPFコントロールの中央揃え
:
<Window x:Class="GreenWebPlayerWPF.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="512" Width="853" WindowStyle="None" WindowState="Maximized" WindowStartupLocation="CenterScreen">
<DockPanel Width="Auto" Height="Auto" Name="TransitionContainer" Background="Black" Margin="0" LastChildFill="True"></DockPanel>
</Window>
マイUserControl
:
<UserControl x:Class="GreenWebPlayerWPF.FrontPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DockPanel Background="Black">
<Image Name="image1" Stretch="None" Source="/GreenWebPlayerWPF;component/gw.png" />
</DockPanel>
</UserControl>
Iが最大/フルスクリーンを使用していますのでご注意ください。
Thxを束、それは – H4mm3rHead
:-)作品これは、Windows RT –
上では動作しませんRT上のストアのアプリを書き込むために使用されるXAMLベースのフレームワークは、WPFではありません。もしあれば、それはSilverlightの派生品です。 –