Erapchu / PasswordManager_net47

0 stars 0 forks source link

Make template for all windows #26

Open Erapchu opened 3 years ago

Erapchu commented 3 years ago

https://stackoverflow.com/questions/32441842/wpf-custom-window-template-no-content https://stackoverflow.com/questions/420538/how-to-make-a-template-window-in-wpf

Erapchu commented 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

Erapchu commented 3 years ago

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

Erapchu commented 3 years ago

https://stackoverflow.com/questions/4726343/converting-controltemplate-xaml-to-c-sharp - apply XAML code to C#

Erapchu commented 3 years ago

https://stackoverflow.com/questions/17704969/wpf-application-current-resources-vs-findresource - use FindResource

Erapchu commented 3 years ago

Move all resource for BaseWindow to one resource file and use FindResource