Microsoft Developer Network > 포럼 홈 > Visual Studio WPF Designer > WPF BROWSER APPLICATION NAVIGATION PROBLEM
질문하기질문하기
 

답변됨WPF BROWSER APPLICATION NAVIGATION PROBLEM

  • 2009년 6월 30일 화요일 오전 1:01a_Nightblade_ 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I have a wpf browser applicaton

    all is working fine but i like to change th looks a little.

    I like to navigate from 1 page to another by clicking a button instead of a hyperlink.

    I have tryed everything but i can't get it done.

    is it even possible or not ?

    More knowledge, means more problems.

답변

  • 2009년 6월 30일 화요일 오전 2:03Mark Wilson-ThomasMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    You can use the NavigationService directly for navigation in XBAPs from any control. For example if you wanted to use a Button for navigation, you might wire up its button event handler like so (this snippet shows me navigating to a new Page called Page2, which is in my XBAP project).

    The back and forward functionality in IE is still retained in these cases.

    using

     

    System.Windows.Navigation;

    ....

     

    private void button1_Click(object sender, RoutedEventArgs e)

    {

     

    this.ns = NavigationService.GetNavigationService(this);

     

    Page p = new Page2();

    ns.Navigate(p);

    }

    Mark

    NB: This sort of question is better posed on the WPF platform forum http://social.msdn.microsoft.com/Forums/en-US/wpf - this forum is really for questions about the Visual Studio WPF and Silverlight Designers.


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
  • 2009년 6월 30일 화요일 오전 2:05Mark Wilson-ThomasMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    You might also find this MSDN article informative: http://msdn.microsoft.com/en-us/library/ms750478.aspx
    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    • 답변으로 표시됨a_Nightblade_ 2009년 6월 30일 화요일 오전 11:43
    •  

모든 응답

  • 2009년 6월 30일 화요일 오전 2:03Mark Wilson-ThomasMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    You can use the NavigationService directly for navigation in XBAPs from any control. For example if you wanted to use a Button for navigation, you might wire up its button event handler like so (this snippet shows me navigating to a new Page called Page2, which is in my XBAP project).

    The back and forward functionality in IE is still retained in these cases.

    using

     

    System.Windows.Navigation;

    ....

     

    private void button1_Click(object sender, RoutedEventArgs e)

    {

     

    this.ns = NavigationService.GetNavigationService(this);

     

    Page p = new Page2();

    ns.Navigate(p);

    }

    Mark

    NB: This sort of question is better posed on the WPF platform forum http://social.msdn.microsoft.com/Forums/en-US/wpf - this forum is really for questions about the Visual Studio WPF and Silverlight Designers.


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
  • 2009년 6월 30일 화요일 오전 2:05Mark Wilson-ThomasMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    You might also find this MSDN article informative: http://msdn.microsoft.com/en-us/library/ms750478.aspx
    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    • 답변으로 표시됨a_Nightblade_ 2009년 6월 30일 화요일 오전 11:43
    •  
  • 2009년 6월 30일 화요일 오전 11:48a_Nightblade_ 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    mark.


    Thank you for the responce it did solve my problem.

    and the page from the library help me out a lot.


    Sorry if posted it in the wrong forum but i didn't know



    I just have 1 question left.


    I see more people work in C#  then in VB

    is VB limited with options compared to C# ?

    or is there another reason.
    More knowledge, means more problems.
  • 2009년 6월 30일 화요일 오후 9:55Mark Wilson-ThomasMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    You are most welcome, a_Nightblade_ - and my comment regarding the correct forum was simply to help with future postings not as a reprimand :-)

    With regard to WPF and Silverlight, there is no functional limitation/advantage between the two languages (both are fully supported for building such applications). I do not have data on the percentage of users using each language.

    The reason you see many postings in C# is simply because many Microsoft product teams use C# internally, which means that when team members respond to your postings they are likely to use the language they use. If you want to see just how much can be accomplished in VB.NET with WPF and Silverlight, I recommend taking a look at my colleague Karl Shifflett's blog:

    http://karlshifflett.wordpress.com/

    Karl's language of choice is VB.NET.


    Mark
    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'