Home > Net >  WPF opened the new interface on the basis of the original interface open? As shown in figure
WPF opened the new interface on the basis of the original interface open? As shown in figure

Time:09-26

I want to do one in the self-service machine operating procedures and how to achieve the effect of the switch interface as shown in figure, not necessarily slip effect, as long as it is in the original screen opens the new interface can, just not popup window type

CodePudding user response:

The simplest is the TabControl can also their own custom controls

CodePudding 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 above
Download http://bbs.cskin.net/thread-15559-1-2.html

  •  Tags:  
  • C#
  • Related