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(); }

}

}

 

 

 




Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Article Discussion: Obfuscation and Packaging of .NET Applications via Compressed Embedded Assemblies - Peter Bromberg  11-Dec-07 7:12:18 AM
      target method to lauch the main windows in WPF - reg t  04-Jan-08 6:58:47 AM
          The sample uses a DLL embedded assembly - Peter Bromberg  04-Jan-08 7:23:36 AM
              how to launch the main windows in WPF ? - reg t  04-Jan-08 9:30:48 AM
                  It is reporting an error in your XAML file. - Peter Bromberg  04-Jan-08 11:00:49 AM
                      XAML and cs code - reg t  04-Jan-08 10:36:52 PM
                      now is ok - reg t  05-Jan-08 3:49:55 AM
                      Does it works with assemblies mixing unmanaged code ? - reg t  05-Jan-08 4:42:06 AM
                      assemblies mixing unmanaged code ? - - reg t  05-Jan-08 9:47:22 AM
      Loader stay running as a process after closing target application - reg t  04-Jan-08 11:38:56 PM
View Posts