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






Provides a lightweight control which able to produce a reflection of the given content.

Object Model

ContentReflector Class

Syntax

Visual Basic (Declaration) 
<TemplatePartAttribute(Name="ReflectionImage", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="ReflectionImageBrush", Type=System.Windows.Media.ImageBrush)>
<TemplateVisualStateAttribute(Name="Right", GroupName="ReflectionStates")>
<DescriptionAttribute("Provides a lightweight control that reflects the specified content.")>
<TemplatePartAttribute(Name="ContentPresenter", Type=System.Windows.Controls.ContentPresenter)>
<TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Top")>
<TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Left")>
<TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Bottom")>
<TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="ReflectionElement", Type=System.Windows.Controls.Grid)>
Public Class ContentReflector 
   Inherits Intersoft.Client.Framework.ISContentControl
   Implements IControlIFramework, ILicensing 
Visual Basic (Usage)Copy Code
Dim instance As ContentReflector
C# 
[TemplatePartAttribute(Name="ReflectionImage", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ReflectionImageBrush", Type=System.Windows.Media.ImageBrush)]
[TemplateVisualStateAttribute(Name="Right", GroupName="ReflectionStates")]
[DescriptionAttribute("Provides a lightweight control that reflects the specified content.")]
[TemplatePartAttribute(Name="ContentPresenter", Type=System.Windows.Controls.ContentPresenter)]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Top")]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Left")]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Bottom")]
[TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ReflectionElement", Type=System.Windows.Controls.Grid)]
public class ContentReflector : Intersoft.Client.Framework.ISContentControl, IControlIFramework, ILicensing  
Delphi 
public class ContentReflector = class(Intersoft.Client.Framework.ISContentControl, IControl, IFramework, ILicensing)
JScript 
TemplatePartAttribute(Name="ReflectionImage", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="ReflectionImageBrush", Type=System.Windows.Media.ImageBrush)
TemplateVisualStateAttribute(Name="Right", GroupName="ReflectionStates")
DescriptionAttribute("Provides a lightweight control that reflects the specified content.")
TemplatePartAttribute(Name="ContentPresenter", Type=System.Windows.Controls.ContentPresenter)
TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Top")
TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Left")
TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Bottom")
TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="ReflectionElement", Type=System.Windows.Controls.Grid)
public class ContentReflector extends Intersoft.Client.Framework.ISContentControl implements IControlIFramework, ILicensing 
Managed Extensions for C++ 
[TemplatePartAttribute(Name="ReflectionImage", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ReflectionImageBrush", Type=System.Windows.Media.ImageBrush)]
[TemplateVisualStateAttribute(Name="Right", GroupName="ReflectionStates")]
[DescriptionAttribute("Provides a lightweight control that reflects the specified content.")]
[TemplatePartAttribute(Name="ContentPresenter", Type=System.Windows.Controls.ContentPresenter)]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Top")]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Left")]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Bottom")]
[TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ReflectionElement", Type=System.Windows.Controls.Grid)]
public __gc class ContentReflector : public Intersoft.Client.Framework.ISContentControl, IControlIFramework, ILicensing  
C++/CLI 
[TemplatePartAttribute(Name="ReflectionImage", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ReflectionImageBrush", Type=System.Windows.Media.ImageBrush)]
[TemplateVisualStateAttribute(Name="Right", GroupName="ReflectionStates")]
[DescriptionAttribute("Provides a lightweight control that reflects the specified content.")]
[TemplatePartAttribute(Name="ContentPresenter", Type=System.Windows.Controls.ContentPresenter)]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Top")]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Left")]
[TemplateVisualStateAttribute(GroupName="ReflectionStates", Name="Bottom")]
[TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ReflectionElement", Type=System.Windows.Controls.Grid)]
public ref class ContentReflector : public Intersoft.Client.Framework.ISContentControl, IControlIFramework, ILicensing  

Remarks

ContentReflector 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.

ContentReflector has a unique fundamental layouting concept. The structure is basically divided into two areas which are ContentElement and ReflectionElement. By default, each area has equal size determined by the ContentHeight and ContentWidth property. The default values for these properties are Double.NaN.

Using these default settings, you need to set the content reflector's height twice as large as its content when the ReflectionPosition is set to Top or Bottom, and content reflector’s width twice as large as its content when the ReflectionPosition is set to Left or Right.

The following examples show how to use ContentReflector with various ReflectionPosition.

XAML Copy Code
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"
    VerticalAlignment="Center">
    <Intersoft:ContentReflector Height="200" Width="100" Margin="4">
        <Grid>
            <Image Source="/Hydrangeas.jpg" Stretch="Fill"/>
        </Grid>
    </Intersoft:ContentReflector>
    <Intersoft:ContentReflector Height="200" Width="100" Margin="4"
        ReflectionPosition="Top">
        <Grid>
            <Image Source="/Hydrangeas.jpg" Stretch="Fill"/>
        </Grid>
    </Intersoft:ContentReflector>
</StackPanel>

XAML Copy Code
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center"
    VerticalAlignment="Center">
    <Intersoft:ContentReflector Height="100" Width="200" Margin="4"
        ReflectionPosition="Left">
        <Grid>
            <Image Source="/Hydrangeas.jpg" Stretch="Fill"/>
        </Grid>
    </Intersoft:ContentReflector>
    <Intersoft:ContentReflector Height="100" Width="200" Margin="4"
        ReflectionPosition="Right">
        <Grid>
            <Image Source="/Hydrangeas.jpg" Stretch="Fill"/>
        </Grid>
    </Intersoft:ContentReflector>
</StackPanel>

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.ContentReflector

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.