Open Erapchu opened 3 years ago
https://stackoverflow.com/questions/12507782/how-to-enable-window-chrome-by-using-c-sharp-code-and-not-xaml - WindowChrome.SetWindowChrome(this, new WindowChrome());
https://stackoverflow.com/questions/7174315/understanding-wpf-deriving-window-class
public class BaseWindow : Window { public BaseWindow() { WindowChrome windowChrome = new WindowChrome(); windowChrome.CaptionHeight = 25; WindowChrome.SetWindowChrome(this, windowChrome); Height = 300; Width = 300; } }
Set <local:BaseWindow ... public partial class ChildWindow : BaseWindow
https://stackoverflow.com/questions/4726343/converting-controltemplate-xaml-to-c-sharp - apply XAML code to C#
Move all resource for BaseWindow to one resource file and use FindResource
https://stackoverflow.com/questions/32441842/wpf-custom-window-template-no-content https://stackoverflow.com/questions/420538/how-to-make-a-template-window-in-wpf