locked
PageFunction Using RRS feed

  • Question

  • Hello 

    In order to  implement the  "Back and Forward" features in my WPF application, I have followed this article.

    http://paulstovell.com/blog/wpf-navigation

    but I'm stuck on PageFunction using .

    <PageFunction
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib" 
        x:Class="PageBasedApplication.PageFunction"
        x:TypeArguments="sys:Object"
        Title="PageFunction"  >
      <Grid>
            <... />
        </Grid>
    </PageFunction>
     public partial class PageFunction : PageFunction<Object>
        {
            public PageFunction()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, RoutedEventArgs e)
            {
                
            }
    
            
        }

    i am getting this Error 

    PageFunction is not supported in a Windows Presentation Foundation (WPF) project.

    Thanks for your help

    Tuesday, May 3, 2016 8:55 AM

Answers

  • You're inheriting from PageFunction.

     public partial class PageFunction : PageFunction<Object>

    Don't call those the same name.

    Make them different

     public partial class SomethingElse: PageFunction<Object>

    Have you another base class called PageFunction<Object> to inherit from?

    .

    This technique is pretty much only useful for wizard style UI where you want the user to do step 1 then step2 then step 3.

    If order of entry doesn't matter then a tabcontrol is something to consider instead.


    Hope that helps.

    Technet articles: WPF: Layout Lab; All my Technet Articles

    Tuesday, May 3, 2016 9:11 AM

All replies

  • You're inheriting from PageFunction.

     public partial class PageFunction : PageFunction<Object>

    Don't call those the same name.

    Make them different

     public partial class SomethingElse: PageFunction<Object>

    Have you another base class called PageFunction<Object> to inherit from?

    .

    This technique is pretty much only useful for wizard style UI where you want the user to do step 1 then step2 then step 3.

    If order of entry doesn't matter then a tabcontrol is something to consider instead.


    Hope that helps.

    Technet articles: WPF: Layout Lab; All my Technet Articles

    Tuesday, May 3, 2016 9:11 AM
  • ok, thanks , changing the name solve my issue
    Tuesday, May 3, 2016 6:46 PM