We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting Width and Height in runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

81935 May 25,2009 06:40 AM UTC May 26,2009 02:14 PM UTC WPF 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On May 25, 2009 06:40 AM UTC

Hi,

I'm trying to set the desiredwidthindockedmode and desiredheightindockedmode of contentcontrol in XAML based on the sideindockedmode property during runtime. I've tried using the triggers to achieve this functionality but it doesnt work. Can you please provide a solution for this?

Regards,
Aishwaria

Balavasanth [Syncfusion]
Replied On May 25, 2009 03:47 PM UTC

Hi Aishwarya,

Thanks for your interests in Syncfusion products.

At the run time we have some issues with the SetDesiredHeightInDockedMode and SetDesiredWidthInDockedMode. To overcome this constraint We have implemented a new methods for setting the hosted element’s Height and Width. You can make use of this. This can be achieved by using the following code snippets.

Dim host As DockedElementTabbedHost = DockingManager.GetHost(elementone, DockState.Dock);
DockingManager.SetHostHeight(host, 500);
DockingManager.SetHostWidth(host, 500);

Please let us know if you have any queries.

Regards,
Bala.

Administrator [Syncfusion]
Replied On May 25, 2009 05:08 PM UTC

Hi,

How can the same code be implemented in XAML?

Regards,
Aishwaria

Balavasanth [Syncfusion]
Replied On May 26, 2009 02:14 PM UTC

Hi Aishwarya,

Thanks for your interests in Syncfusion products.

As we said in my previous update, we have some issues with the DesiredHeightInDockedMode, DesiredWidthInDockedMode properties while we change in run time. You can easily use those properties in the trigger as follows.

[XAML]








But currently due to this defect we will not be able to change the DesiredHeightInDockedMode, DesiredWidthInDockedMode properties dynamically. So you will not be able to use it in the XAML. This will be fixed in our upcoming releases.Asas As work around you can make use of the SetHostHeight and SetHostWidth methods, using which you can dynamically iterate through the each and every element of the Docking Manager check for the corresponding side in Docked Mode for the frame work element and apply the host height and width for the corresponding element.

//iterate through each and every element
foreach (FrameworkElement felement in dockingmanager.Children)
{
//check the SideInDockedMode

if (DockingManager.GetSideInDockedMode(felement) == DockSide.Bottom)
{
DockedElementTabbedHost host = DockingManager.GetHost(elementone, DockState.Dock);
DockingManager.SetHostHeight(host, 500);
DockingManager.SetHostWidth(host, 500);
}
}

Please let us know if you have any queries.

Regards,
Bala.




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;