![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Anyone know how to pass by reference to a COM object? | PowerShell | |||
| Can I pass object along the pipeline to a ps1? | PowerShell | |||
| Any way(s) to pass an IComparer object instance to ArrayList.sort? | PowerShell | |||