![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | How to pass object to XAML page Hi, I have a WindowsForm with a Frame and I load some page inside the frame. The XAML of the main form is: <Window x:Class="Sicop.Contabilita.WindowMain" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="abilita" Height="600" Width="800" Initialized="Init"> <DockPanel LastChildFill="True"> <StackPanel DockPanel.Dock="Left" VerticalAlignment="Top" Name="stackPanel1"> </StackPanel> <Frame Content="" Name="frameWorkPage"> </Frame> </DockPanel> </Window> I loade in the frame some page without problem with this command: this.frameWorkPage.Navigate(new System.Uri("ContiCorrenti/PageContiCorrentiMovimenti.Xaml", UriKind.Relative)); and work fine, but how I can pass a parametrs to the loaded page? I have tried using the page constructor: ImpegniAccertamenti.iaPageElenco pageIA = new Sicop.Contabilita.ImpegniAccertamenti.iaPageElenco(object param); this.frameWorkPage.Navigate(pageIA); but don't work. I have tried witn the Navigation . I have added the event in lhe page costructor this.NavigationService.LoadCompleted += new LoadCompletedEventHandler(NavigationService_LoadCompleted); And I have created the method: void NavigationService_LoadCompleted(object sender, NavigationEventArgs e) { this._IA = 'I'; } But I get a null reference exception System.NullReferenceException {"Object reference not set to an instance of an object."} Thanks. Lorenzo Soncini |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can I pass object along the pipeline to a ps1? | Marco Shaw | PowerShell | 3 | 03-08-2007 09:46 PM |
| Any way(s) to pass an IComparer object instance to ArrayList.sort? | Sung M Kim | PowerShell | 4 | 11-27-2006 09:23 PM |
| Re: Hosting a XAML page within a Winform. | Jason | Avalon | 2 | 02-08-2006 11:32 AM |
| Hosting a XAML page within a Winform. | Jason | Avalon | 0 | 02-08-2006 11:32 AM |
| Hosting a XAML page within a Winform. | Jason | Avalon | 3 | 02-04-2006 03:37 AM |