How to resize hight width of the User control at loading time.
Are you looking for a way to resize hight width of the User control at loading time in wpf ? then read this thread to know more about it
Hi,
I have a user control. Below the XMAL Code
<vw:ViewBase x:Class="ToDoMainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igDP="http://infragistics.com/DataPresenter"
xmlns:infraEditor="http://infragistics.com/Editors"
xmlns:igWindows="http://infragistics.com/Windows"
xmlns:vm="clr-namespace:WPF.ViewModel;assembly=ViewModel"
xmlns:acb="clr-namespace:AttachedCommandBehavior;assembly=AttachedCommandBehavior"
xmlns:utils="clr-namespace:CommonUtilities;assembly=CommonUtilities"
xmlns:vw="clr-namespace:WPF"
Cursor="{Binding CurrentCursor}" Loaded="UserControl_Loaded"
acb:CommandBehavior.Command="{Binding ToDoViewScreenGotFocus}"
acb:CommandBehavior.Event="GotFocus"
KeyDown="ToDoWindowKeyDown"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FocusManager.FocusedElement="{Binding todoDataGrid}"
MinHeight="620"
MinWidth="808">
</vw:ViewBase>
XMAL.cs Code
namespace WPF
{
public partial class ToDoMainView : ViewBase
{
public ToDoMainViewSE()
{
InitializeComponent();
}
}
}
Viewbase is inherited from a User control.
Suppose User clicks on a button control and this user control is displayed.
I need to set the user coontrol location and hight width at run time. Currently the MINheight and width is set in XMAL but my requirenment i need to resize at run time and loaction also set accordingly.
Many Thanks In Advance Please help.