c# - XAML-inheritance, code re-use, optimization -


in wpf4 desktop application windows have same structure — header & footer main menu , copyright marks; left-side navigation menu , body (center of screen) show data, main toolbar etc. body block block changes in windows, e.g. in window students show datagrid students' data, in window new course form user can fill in form , submit db. stuff located in body section of windows.

in order improve reusability of code, use inheritance of c# code, store basic window functions in generalwindow , other windows extend class.

my question is: can use same technique in order reduce copy of same code-block in xaml-part of window? moment, each window class has same blocks of xaml code (e.g. left side menu, header, footer). how can reduce code copy , use same technique used in case of c#? possible inheritance xaml-class (.xaml) define basic stuff in 1 class , other extend/inherit design of class? increase code reusability.

you should create 1 window , put frame on it. dynamically load pages in frame.

see navigation overview


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -