[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

WPF Application page navigation

Posted on 2010-09-14
8
Medium Priority
?
617 Views
Last Modified: 2013-11-12
Hi Experts,
I am new to WPF (know windows forms) and still struggling with some of the basics. Please be kind and be very clear with your assistance.
I have created a main window and added a ribbon with buttons.
I now want to open (show) a page (window) based on button click.
On the page I want to get user input and return the values.
Very basic stuff in winforms. Not so easy in WPF (it seems)
I am using Visual Studio 2010 (Visual Basic)
0
Comment
Question by:esps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:DmitryVasiliev
ID: 33670565
Hello
You need to use "PageFunction" instead of "Page".
In this case you are able to get result using OnResult event of PageFunction.

See details here:
http://msdn.microsoft.com/en-us/library/ms615540.aspx
http://msdn.microsoft.com/en-us/library/aa349685.aspx
0
 

Author Comment

by:esps
ID: 33672109
Hi
Thank you for your response.

My code is as below, attached find error image:

Class MainWindow
Public ReadOnly Property NavigationService As NavigationService
        Get
        End Get
End Property

Private Sub RibbonButton3_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles RibbonButton3.Click
        Dim pageFunctionUri As New Uri("SetupCriteria.xaml", UriKind.Relative)
        Me.NavigationService.Navigate(pageFunctionUri)
    End Sub
End Class
Capture.PNG
0
 
LVL 2

Expert Comment

by:DmitryVasiliev
ID: 33672440
Use NavigationPage instance as "Navigate" function parameter instead of Uri

Something like

Dim page as New SetupCriteria();
page.OnResult += ResultHandlerFunction;
Me.NavigationService.Navigate(page);
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:esps
ID: 33673989
Forgive my 'blondness'
I am not winning with the syntax (or something)

Private Sub RibbonButton3_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles RibbonButton3.Click
        Dim page As New SetupCriteria()
        page.OnResult += ResultHandlerFunction
        Me.NavigationService.Navigate(page)
        End Sub

Please see image
Untitled.jpg
0
 
LVL 2

Expert Comment

by:DmitryVasiliev
ID: 33674035
Did you define ResultHandlerFunction handler?
0
 

Author Comment

by:esps
ID: 33674956
I am sorry.
This is not helping me.
You are obviously at a different level with this.
Please show me step by step, give me examples or links with specific examples.
regards
0
 
LVL 2

Accepted Solution

by:
DmitryVasiliev earned 2000 total points
ID: 33675086
0
 

Author Comment

by:esps
ID: 33679892
Hi
Thank you. This has put me on the right track.
I will be accepting your previous answer as solution.
Please won't you also have a look at a previous question of mine that I am not getting helpful responses on?
ID: 26417220
best regards
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question