Setting 100% width and 100% height for a Textbox in WPF

2 Comments

If you want to stretch a textbox to the width of the window in WPF you can use the following code   Code <Window x:Class="Ada.Eac.UI.DeployWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="DeployWindow" Height="300" Width="988" SnapsToDevicePixels="True" UseLayoutRounding="True" WindowState="Maximized" WindowStartupLocation="CenterScreen" Icon="/Eac;component/Dashboard.ico">

Center a group box in a WPF application

0 Comments

If you want to center a group box in a WPF application, you can use the HorizontalAlignment property. HorizontalAlignment="Center" Make sure the margin left and margin right are 0   Margin="0,30,0,0"   Code <Window x:Class="Rvl.DashBoard.Wpf.MainWindow"