Spread WPF Documentation
DynamicMove Property
Example 


Gets or sets whether the object moves when hiding or showing, resizing, or moving rows or columns.
Syntax
'Declaration
 
Public Property DynamicMove As System.Boolean
'Usage
 
Dim instance As FloatingObject
Dim value As System.Boolean
 
instance.DynamicMove = value
 
value = instance.DynamicMove
public System.bool DynamicMove {get; set;}

Property Value

true if the object dynamically moves; otherwise, false.
Example
This example uses the DynamicMove property.
public class MyFloatingObject : GrapeCity.Windows.SpreadSheet.UI.CustomFloatingObject
        {
            public MyFloatingObject(string name, double x, double y, double width, double height)
                : base(name, x, y, width, height)
            {
            }

            public override FrameworkElement Content
            {
                get
                {
                    Border border = new Border();

                    StackPanel sp = new StackPanel();
                    sp.Children.Add(new Label() { Content = "Label" });
                    sp.Children.Add(new Button() { Content = "Button" });

                    border.BorderThickness = new Thickness(1);
                    border.BorderBrush = new SolidColorBrush(Colors.Black);
                    border.Child = sp;
                    return border;
                }
            }
        }

//add instance of this floating object into worksheet
MyFloatingObject mf = new MyFloatingObject("mf1", 10, 10, 200, 100);
mf.DynamicMove = true;
mf.DynamicSize = true;
gcSpreadSheet1.ActiveSheet.FloatingObjects.Add(mf);
Public Class MyFloatingObject
    Inherits GrapeCity.Windows.SpreadSheet.UI.CustomFloatingObject
    Public Sub New(name As String, x As Double, y As Double, width As Double, height As Double)
        MyBase.New(name, x, y, width, height)
    End Sub

    Public Overrides ReadOnly Property Content() As FrameworkElement
        Get
            Dim border As New Border()

            Dim sp As New StackPanel()
            sp.Children.Add(New Label() With { _
                .Content = "Label" _
            })
            sp.Children.Add(New Button() With { _
                .Content = "Button" _
            })

            border.BorderThickness = New Thickness(1)
            border.BorderBrush = New SolidColorBrush(Colors.Black)
            border.Child = sp
            Return border
        End Get
    End Property
End Class

'add instance of this floating object into worksheet
Dim mf As New MyFloatingObject("mf1", 10, 10, 200, 100)
mf.DynamicMove = True
mf.DynamicSize = True
GcSpreadSheet1.ActiveSheet.FloatingObjects.Add(mf)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

FloatingObject Class
FloatingObject Members

 

 


Copyright © GrapeCity, inc. All rights reserved.