inheritance in Window

Eduardo Gomez 3,426 Reputation points
2022-07-21T18:08:33.38+00:00

Hello

I am doing an app, that every new Window is a Chromeless Windows and uses fluent design.

Every time I create a new XAML I have to declare

<syncfusion:ChromelessWindow  
    xmlns:syncfusion="http://schemas.syncfusion.com/wpf"  
    xmlns:syncfusionskin="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"  
    syncfusionskin:SfSkinManager.Theme="{syncfusionskin:SkinManagerExtension ThemeName=FluentDark}"  
    AllowsTransparency="True"  
    CornerRadius="10"  
    ShowIcon="False"  
    mc:Ignorable="d">  
  
    <Grid />  
</syncfusion:ChromelessWindow>  

and in my code behind

public partial class CittyDetailsWinow : ChromelessWindow  
{  
    public CittyDetailsWinow()  
    {  
        InitializeComponent();  
    }  
}  

my question is, there is a way to make all my windows implement this automatically

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,783 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
814 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.