C#/C# WPF
UserControl WindowStyle
doublerabbits
2022. 9. 27. 20:49
- UserControl 에 WindowStyle 적용
<UserControl
x:Class="GUI_Starter.Dialogs.DialogNotification"
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:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:GUI_Starter.Dialogs"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d"
Height="300" Width="400">
<prism:Dialog.WindowStyle>
<Style TargetType="{x:Type Window}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterOwner"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="ShowInTaskbar" Value="False"/>
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
<Setter Property="Topmost" Value="True"/>
</Style>
</prism:Dialog.WindowStyle>
<Grid>
...
</Grid>
</UserControl>