c# - Loaded does not exist on inherited BaseDiagramPage -


i have basediagrampage class inherits directly page. idea hold common functionality across multiple pages (let me know if bad way it). xaml classes implementing basediagrampage complaining this.loaded not exist. works fine if inherit page directly in xaml class.

the basediagrampage class can literally have nothing in it.

any insights appreciated.

public sealed partial class emptypage : basediagrampage {     public emptypage()     {         this.initializecomponent();          // property not exist, basediagrampage public         this.loaded += (sender, e) =>         {             // load         };     } } 

edit:

basediagrampage source

namespace coreproject.pages {     public class basediagrampage : page     {      } } 

edit edit:

using base.loaded works, right? want call classes loaded

base.loaded += (sender, e) => { }; 

i think forgot change xaml part of emptypage, change

<page x:class="xxx.emptypage" ...>     ... </page> 

to

<local:basediagrampage x:class="xxx.emptypage" ...>     ... </local:basediagrampage> 

after doing this, can remove inheritance c# code it's redundant. following work.

public sealed partial class emptypage 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -