Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Mainwindow で作成されたコントロールを取得し、ビューを切り替えるときに、その zindex を一番上にしてビューの上に表示することは可能ですか?
ZIndex で遊んでみましたが、うまくいきませんでした。
ZIndexは Canvas プロパティであるため、Grid などの他のパネル タイプでは機能しません。上に表示する必要がある場合は、コントロールを から継承するか、内部に配置することができますPopup。
Popup
または、メイン ウィンドウの XAML の一番下に追加すると、一番上に表示されます。
DockPanel を試す必要があります。
<DockPanel LastChildFill="True"> <TextBlock DockPanel.Dock="Top" Background="OliveDrab" Foreground="Cornsilk" FontFamily="Veranda" FontSize="20" TextAlignment="Center"> </DockPanel>