TaskGroupHeader 
class
This 
item only can be used on Metro Tasks Screen. It is a customizable 
container used to display some group information.
Examples
The 
following example shows how to use TaskGroupHeader.
In 
the MainSurfaceSlider.xaml file, add the codes as following
<src:SurfaceSlider
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:src="clr-namespace:LinsUIWPF;assembly=LinsUIWPF"  
x:Class="Demo.SurfaceSliders.MainSurfaceSlider"  
mc:Ignorable="d" Height="435" Width="1130">
<!--------------------------------------------->
<src:SurfaceSliderTasksPanel>
<src:TaskGroup ID="4011" 
Text="File 
Operation">
<src:TaskGroupHeader>
<Grid 
HorizontalAlignment="Stretch" 
VerticalAlignment="Stretch">
<ContentPresenter x:Name="GroupHeader1" Content="{Binding}" 
ContentTemplate="{StaticResource 
TaskGroupHeaderTemplate1}" 
HorizontalAlignment="Stretch" 
VerticalAlignment="Stretch"/>
</Grid>
</src:TaskGroupHeader>
<src:TaskButton Text="Copy" 
ID="4012” ButtonType="LARGE" ViewID = "{StaticResource 
DESERTLAND_DOC_ID}" 
CommandID="{StaticResource 
COPY_COMMAND_ID}">
<Grid 
HorizontalAlignment="Stretch" 
VerticalAlignment="Stretch">
<ContentPresenter x:Name="CopyTask" Content="{Binding}" 
ContentTemplate="{StaticResource 
CopyTaskTemplate}" 
HorizontalAlignment="Stretch" 
VerticalAlignment="Stretch"/>
</Grid>
</src:TaskButton>
</src:TaskGroup>
</src:SurfaceSliderTasksPanel>
<!--------------------------------------------->
</src:SurfaceSlider>
§  
Constructors
1)  
public 
TaskGroupHeader() 
Remarks
Initialize 
a new instance of TaskGroupHeader. 
§  
Members
1)  
public virtual Rect Bounds { get; }
Remarks
Retrieve 
both the size and the location of this header, in pixels, relative to its 
parent.
3)  
public virtual Rect BoundsAtMDIFrame { get; }
Remarks
Retrieve 
both the size and the location of this header, in pixels, relative to MDI 
frame.
§  
Methods
1)  
public virtual bool HitTest(
Point 
ptMousePosAtMDIFrame)                  
Parameters
ptMousePosAtMDIFrame
Type: 
Point
A 
location which is in MDI Frame coordinate. 
Remarks
Test 
whether the point, ptMousePosAtMDIFrame, 
which is in MDI Frame coordinate, is inside this header.
2)  
public 
virtual Size MeasureSize()               
Remarks
This 
calculates how much space the header requires. If the user wants to customize 
the header, this method may need to be overridden by the user.
3)  
public 
void 
Refresh()               
Remarks
This 
forces to redraw the header. 
Demo
References:

No comments:
Post a Comment