XAML and cs code |
| reg t replied to Peter Bromberg at 04-Jan-08 10:36 |
The same Windows, with the very same XAML, runs ok with the Loader application when I invoke, instead, the public method kk() { Show(); } , which I inserted into the target application code in order to let the windows appears. See the XAML and C# codes below.
But my purpose is to call some method, I supose should already exist in the target application, in charge of launching the main Windows when the application normaly runs, so as to avoid changing the original target application code.
This is the WPF target windows application code.
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<DockPanel>
<Button DockPanel.Dock="Top">Button</Button>
<TextBlock></TextBlock>
</DockPanel>
</ Window>
and...
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
}
public void kk() { Show(); }
}
}
|
|