public void SetLockedAspectRatio( bool lockedAspectRatio )
Public Sub SetLockedAspectRatio( _ ByVal lockedAspectRatio As Boolean _ )
Parameters
- lockedAspectRatio
- Double
public void SetLockedAspectRatio( bool lockedAspectRatio )
Public Sub SetLockedAspectRatio( _ ByVal lockedAspectRatio As Boolean _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method must be called within the lambda passed to QueuedTask.Run. |
System.InvalidOperationException | This element requires its mapview to be active |
true
, this means if element width is set, then the element height will be automatically adjusted appropriately. The same is true if height were modified, then width would automatically be adjusted.//Modify an element's aspect ratio. //Perform on the worker thread await QueuedTask.Run(() => { bool elmLocked = element.GetLockedAspectRatio(); elmLocked = false; //Turn off the locked state. element.SetLockedAspectRatio(elmLocked); //You don't have to get to set; a shortcut would be: element.SetLockedAspectRatio(false); });
Target Platforms: Windows 10, Windows 8.1