saeid
saeid

Reputation: 13

how to remove border when AllowsTransparency="false" in wpf

How to remove window borders or if not removed Thinner or change color borders to disappear borders when AllowsTransparency="false" . in my program AllowsTransparency must be set to false, because i am using winforms control that does not allow AllowsTransparency="true" . I do not want to use the library .

Upvotes: 1

Views: 804

Answers (1)

Nick
Nick

Reputation: 644

If you're just looking to remove the borders on a Window, set the WindowStyle to None. If you also want to remove the resize handles, set ResizeMode to NoResize.

<Window x:Class="WPF_TestApp.Window14"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Borderless Window" Height="300" Width="300"
    WindowStyle="None" ResizeMode="NoResize" />

Upvotes: 1

Related Questions