After I inherit from a ChromelessWindow, I have this strange outcome like in the picture below : The window with title 'TestWindowCurves' is a standard ChromelessWindow, but the window named 'Constant Editor' makes the decorators of the window look like that.
It used to work before for that same window as it was a chromeless one
and I just have replaced the name for the derived class in both xaml and
code behind. The xaml header for that window looks like this :
<base:ChangeAwareWindow x:Class="Livinoid.Wpf.Shared.Forms.ConstantEditorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
mc:Ignorable="d"
xmlns:syncfusionskin="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
xmlns:base="clr-namespace:Livinoid.Wpf.Shared.Base"
syncfusionskin:SfSkinManager.Theme="{syncfusionskin:SkinManagerExtension ThemeName=FluentDark}"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
Icon="../Resource/Constant_01.png"
x:Name="Window"
Title="Constant Editor">
I'm using syncfusion version 19.3.0.43 on Windows 10 Pro (latest updates), the project is NET6.0.
For the derived class I just created a class and derived from ChromelessWindow and added some properties and common functions to it like in the code below :
public class ChangeAwareWindow : ChromelessWindow
{
#region Constants
#endregion
#region Vars, Fields and Props
public bool IsChanged { get; set; } = false;
/// <summary>
/// Is this form cancelled for instance via the 'cancel' button or the form closing via
/// the 'close' button of the form.
/// <br></br>The default is true. You should set this to false if the data is saved.
/// <remarks>If the value is not set to false, a messagebox will pop up asking
/// if the data must be saved.</remarks>
/// </summary>
public bool IsCancelled { get; set; } = true;
#endregion
#region Events and Actions
#endregion
#region Methods and Functions
public ChangeAwareWindow()
{
Closing += Window_OnClosing;
}
protected virtual void Window_OnClosing(object? sender, CancelEventArgs e)
{
if (IsCancelled && IsChanged)
{
if (MessageBox.Show($"Changes are made, would you like to save them ?",
$"Changes", MessageBoxButton.YesNo,
MessageBoxImage.Question) == MessageBoxResult.Yes)
{
IsCancelled = false;
}
}
}
#endregion
Am I doing something wrong or is this a bug ?
Cheers
Hi Elakkiya,
Your assumptions are correct and I'm looking forward to the the update !
Cheers,
Geert
|
Recommended approach – exe will perform automatic configuration
Please find the patch setup here:
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from:
Please find the Nugets from the below location:
|