inheritance in Window

Eduardo Gomez 4,176 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

Developer technologies | Windows Presentation Foundation
Developer technologies | XAML
Developer technologies | 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.
{count} votes

Your answer

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