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
Post a Comment