CodePudding user response:
The simplest is the TabControl can also their own custom controlsCodePudding user response:
Using ContentControl + UserControl or Frame + Page.CodePudding user response:
///& lt; Summary>
///mobile component
///& lt;/summary>
Public void moveTo (FrameworkElement control, Point destinationPoint, double space)
{
Point curPoint=new Point ();
If (double. IsNaN (Canvas. GetLeft (control)) | | double. The IsNaN (Canvas. GetLeft (control)))
{
CurPoint=TranslatePoint (new Point (0, 0), control);
CurPoint. X=curPoint. X & lt; 0? - curPoint. X: curPoint. X;
CurPoint. Y=curPoint. Y & lt; 0? - curPoint. Y: curPoint. Y;
}
The else
{
CurPoint. X=Canvas. GetLeft (control);
CurPoint. Y=Canvas. GetTop (control);
}
Storyboard Storyboard=new Storyboard ();
Double lxspeed=space, lyspeed=space;
DoubleAnimation DoubleAnimation=new DoubleAnimation (
CurPoint. X,
DestinationPoint. X,
The new Duration (TimeSpan. FromMilliseconds (lxspeed * 1000))
);
Storyboard. SetTarget (doubleAnimation, control);
Storyboard. SetTargetProperty (doubleAnimation, new PropertyPath (" (Canvas. Left) "));
Storyboard. Children. The Add (doubleAnimation);
DoubleAnimation=new doubleAnimation (
CurPoint. J Y,
DestinationPoint. J Y,
The new Duration (TimeSpan. FromMilliseconds (lyspeed * 1000))
);
Storyboard. SetTarget (doubleAnimation, control);
Storyboard. SetTargetProperty (doubleAnimation, new PropertyPath (" (Canvas. Top) "));
Storyboard. Children. The Add (doubleAnimation);
Storyboard. The Begin ();
}
CodePudding user response:
After the aboveDownload http://bbs.cskin.net/thread-15559-1-2.html