内側のボタンをクリックしたときに、私はこのは1つがWindowsFormHost
<Window x:Class="WPFSort.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFSort"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<WindowsFormsHost HorizontalAlignment="Left" Height="Auto"
Margin="87,43,0,0" VerticalAlignment="Top" Width="Auto">
<local:SimpleWinControl />
</WindowsFormsHost>
</Grid>
</Window>
ようなもので、windowsFormHostコントロールをホストとSimpleWinControlのために、それはのWinFormコントロールであるWPFダイアログを、持っているWPFダイアログを閉じます。 button 1
をクリックすると、私は、WPFダイアログがWPFダイアログを呼び出すWPFフォームに「配る」ことを
とデータimportantdata
を閉じることが
- をしたいですか?
Button
制御公開しpublic partial class SimpleWinControl : UserControl { public SimpleWinControl() { InitializeComponent(); } public object importantdata; private void button1_Click(object sender, EventArgs e) { //how should I write the close and pass the importantdata out } }