Intersoft ClientUI Documentation
ExpandableContentPresenter Class
Members  See Also  Send Feedback
Intersoft.Client.UI.Controls Namespace : ExpandableContentPresenter Class






Provides a lightweight expandable content presenter.

Object Model

ExpandableContentPresenter Class

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Provides a lightweight expandable content presenter.")>
<TemplatePartAttribute(Name="ContentSite", Type=System.Windows.Controls.ContentPresenter)>
Public Class ExpandableContentPresenter 
   Inherits Intersoft.Client.Framework.ISContentControl
   Implements IControlIFramework, ILicensing 
Visual Basic (Usage)Copy Code
Dim instance As ExpandableContentPresenter
C# 
[DescriptionAttribute("Provides a lightweight expandable content presenter.")]
[TemplatePartAttribute(Name="ContentSite", Type=System.Windows.Controls.ContentPresenter)]
public class ExpandableContentPresenter : Intersoft.Client.Framework.ISContentControl, IControlIFramework, ILicensing  
Delphi 
public class ExpandableContentPresenter = class(Intersoft.Client.Framework.ISContentControl, IControl, IFramework, ILicensing)
JScript 
DescriptionAttribute("Provides a lightweight expandable content presenter.")
TemplatePartAttribute(Name="ContentSite", Type=System.Windows.Controls.ContentPresenter)
public class ExpandableContentPresenter extends Intersoft.Client.Framework.ISContentControl implements IControlIFramework, ILicensing 
Managed Extensions for C++ 
[DescriptionAttribute("Provides a lightweight expandable content presenter.")]
[TemplatePartAttribute(Name="ContentSite", Type=System.Windows.Controls.ContentPresenter)]
public __gc class ExpandableContentPresenter : public Intersoft.Client.Framework.ISContentControl, IControlIFramework, ILicensing  
C++/CLI 
[DescriptionAttribute("Provides a lightweight expandable content presenter.")]
[TemplatePartAttribute(Name="ContentSite", Type=System.Windows.Controls.ContentPresenter)]
public ref class ExpandableContentPresenter : public Intersoft.Client.Framework.ISContentControl, IControlIFramework, ILicensing  

Remarks

ExpandableContentPresenter is inherited from ISContentControl, which means that it can contain a single object of any types, such as a string, an image, or a panel. For more information about this content model, see Content Model Overview.

The content of ExpandableContentPresenter must be a UIElement with fixed Height and/or Width, which is used as reference for the expand and collapse animation.

To expand and collapse the content, simply set the IsExpanded property to true and false respectively. Alternatively, you can use your own animation or storyboard to animate the Percentage property. The Percentage property indicates the area that is currently expanded, which allows you to easily animate this value, from 0 (Collapsed) to 1 (Fully Expanded).

The following example shows how to use the ExpandableContentPresenter control.

XAML Copy Code
<Intersoft:ExpandableContentPresenter x:Name="ExpandableContainer" VerticalAlignment="Top" FontSize="32">
    <Grid Height="100">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFF8027" Offset="0.004"/>
                <GradientStop Color="#FF8F3B00" Offset="1"/>
            </LinearGradientBrush>
        </Grid.Background>
        <ContentPresenter Content="Content Presenter" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</Intersoft:ExpandableContentPresenter>
<Intersoft:UXCheckBox Content="Expand / Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center" 
                      CheckedState="{Binding IsExpanded, ElementName=ExpandableContainer, Mode=TwoWay}" />    

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ContentControl
                  Intersoft.Client.Framework.ISContentControl
                     Intersoft.Client.UI.Controls.ExpandableContentPresenter

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.