Hi,
I want to create a MessageBox like window with the ChromelessWindow. Is it possible to disable or hide (better) the close button of the window? I've tried the WindowsStyle="ToolWindow" but this has no effect when using the FluentDark Theme. Many thanks in advance!
Best regards Andreas
Hi Andreas,
Since your requirement is to create a MessageBox like a window using the ChromelessWindow so we suggest to hide the minimize and maximize button by setting properties ShowMaximizeButton="False" and ShowMinimizeButton="False" in ChromelessWindow. Please refer to the below image.
Please let us know if you have any other concerns.
Regards,
Arunthivakar A.
Hi Arunthivakar,
thanks for your response. This was the first thing I have done. But how to get rid of the close button ("x").
Unfortunately there is no property like "ShowCloseButton" or sim
Hi Andreas,
Currently, we don't have support for hiding the close button in ChromelessWindow. But as per your requirement, we can able to provide you the customized style for the ChromelessWindow to hide the close button so could you please tell us the themes you are using so that will be helpful for us to provide the prompt solution for this.
Regards,
Arunthivakar A
Hello Arunthivakar,
I'm using currently the WPF Fluent Dark and Fluent Light theme in my projects.
Best regards
Andreas
|
# App.Xaml:
<local:TitleButton
x:Name=”CloseButton”
shell:WindowChrome.IsHitTestVisibleInChrome=”True”
Command=”local:ChromelessWindow.CloseWindow”
Style=”{StaticResource WPFGlyphButtonStyle}”
Template=”{TemplateBinding CloseButtonTemplate}”
Width=”40”
Height=”32”
Visibility=”Collapsed”
ToolTip=”{Sync_Resources:SharedLocalizationResourceExtension ResourceName=CloseTooltip}”>
<local:TitleButton.Content>
<Path
Name=”closePath”
Width=”10”
Height=”10”
HorizontalAlignment=”Center”
VerticalAlignment=”Center”
Data=”M5.70801 5.11182L10 9.40381L9.29199 10.1118L5 5.81982L0.708008 10.1118L0 9.40381L4.29199 5.11182L0 0.819824L0.708008 0.111816L5 4.40381L9.29199 0.111816L10 0.819824L5.70801 5.11182Z”
Fill=”{Binding Foreground, ElementName=CloseButton}”
SnapsToDevicePixels=”True”
Stretch=”Fill”
StrokeThickness=”0" />
</local:TitleButton.Content>
</local:TitleButton>
# MainWindow.Xaml
<shared:ChromelessWindow x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
Template="{StaticResource SyncfusionChromelessWindowControlTemplate}"
mc:Ignorable="d"
xmlns:shared="clr-namespace:Syncfusion.Windows.Shared;assembly=Syncfusion.Shared.Wpf"
xmlns:Skins="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF"
Skins:SfSkinManager.VisualStyle="FluentLight"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</shared:ChromelessWindow> |
Hi Arunthivakar,
thank you very much for your support. This is exactly what I was looking for!
Best regards
Andreas
Hi Andreas,
We are glad to know that the provided solution resolved your reported issue at your end. Please let us know if you need any further assistance on this. As always, we are happy to assist you.
Regards,
Sulthan amanu