wpf界面右显示块缩进重新设计,逻辑和winform一致,并带有动画效果。v1.7.4
This commit is contained in:
@@ -44,7 +44,7 @@ namespace CommonLibrary
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
SoftBasic.FrameworkVersion = new SystemVersion("1.7.3");
|
SoftBasic.FrameworkVersion = new SystemVersion("1.7.4");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,11 +112,6 @@
|
|||||||
<materialDesign:PackIcon Kind="Palette" />
|
<materialDesign:PackIcon Kind="Palette" />
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="窗口显示" x:Name="MenuItem窗口显示" Click="MenuItem窗口显示_Click">
|
|
||||||
<MenuItem.Icon>
|
|
||||||
<materialDesign:PackIcon Kind="KeyboardTab" />
|
|
||||||
</MenuItem.Icon>
|
|
||||||
</MenuItem>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="_关于">
|
<MenuItem Header="_关于">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
@@ -197,7 +192,7 @@
|
|||||||
|
|
||||||
<!--右侧的账户信息和登录消息-->
|
<!--右侧的账户信息和登录消息-->
|
||||||
<Grid DockPanel.Dock="Right">
|
<Grid DockPanel.Dock="Right">
|
||||||
<Grid Name="MainPageRight" Width="230">
|
<Grid Name="MainPageRight" Width="230" Visibility="Visible">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="auto"></RowDefinition>
|
<RowDefinition Height="auto"></RowDefinition>
|
||||||
<RowDefinition Height="auto"></RowDefinition>
|
<RowDefinition Height="auto"></RowDefinition>
|
||||||
@@ -290,6 +285,26 @@
|
|||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
<!--
|
||||||
|
<TextBlock Margin="0,9,10,0" HorizontalAlignment="Right" Foreground="{DynamicResource PrimaryHueMidForegroundBrush}">>></TextBlock>
|
||||||
|
-->
|
||||||
|
<Grid Margin="0,4,4,0" HorizontalAlignment="Right" MouseDown="packIcon_right_shrink_Click" Cursor="Hand" Background="Transparent">
|
||||||
|
<materialDesign:PackIcon Kind="ChevronDoubleRight" Width="25" Height="25"
|
||||||
|
Name="packIcon_right_shrink"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
<Grid Name="MainPageRightMini" Visibility="Collapsed" Width="25">
|
||||||
|
<StackPanel>
|
||||||
|
<Grid MouseDown="packIcon_right_restore_Click" Cursor="Hand" Background="Transparent">
|
||||||
|
<materialDesign:PackIcon Kind="ChevronDoubleLeft" Name="packIcon_right_restore" HorizontalAlignment="Left" Width="25" Height="25"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid MouseDown="packIcon_right_profile_MouseDown" Cursor="Hand" Background="Transparent">
|
||||||
|
<materialDesign:PackIcon Kind="Account" Name="packIcon_right_profile" HorizontalAlignment="Left" Width="25" Height="25"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid MouseDown="packIcon_right_file_MouseDown" Cursor="Hand" Background="Transparent">
|
||||||
|
<materialDesign:PackIcon Kind="FileCloud" Name="packIcon_right_file" MouseDown="packIcon_right_file_MouseDown" HorizontalAlignment="Left" Width="25" Height="25"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -411,18 +411,7 @@ namespace 软件系统客户端Wpf
|
|||||||
fmr.ShowDialog();
|
fmr.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MenuItem窗口显示_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
if (MainPageRight.Visibility != Visibility.Collapsed)
|
|
||||||
{
|
|
||||||
MainPageRight.Visibility = Visibility.Collapsed;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainPageRight.Visibility = Visibility.Visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -828,6 +817,8 @@ namespace 软件系统客户端Wpf
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region User Interface
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************************
|
/**********************************************************************************************
|
||||||
*
|
*
|
||||||
@@ -836,6 +827,8 @@ namespace 软件系统客户端Wpf
|
|||||||
**********************************************************************************************/
|
**********************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Button_BackMain_Click(object sender, RoutedEventArgs e)
|
private void Button_BackMain_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
//点击了主页
|
//点击了主页
|
||||||
@@ -849,7 +842,43 @@ namespace 软件系统客户端Wpf
|
|||||||
await Task.Delay(2000);
|
await Task.Delay(2000);
|
||||||
DialogHostWait.IsOpen = false;
|
DialogHostWait.IsOpen = false;
|
||||||
}
|
}
|
||||||
|
private void packIcon_right_profile_MouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
// 点击我的信息
|
||||||
|
MenuItem我的信息_Click(sender, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void packIcon_right_file_MouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
// 点击共享文件
|
||||||
|
Border_MouseLeftButtonDown(sender, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void packIcon_right_shrink_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
DoubleAnimation doubleAnimation = new DoubleAnimation(
|
||||||
|
25, new Duration(TimeSpan.FromMilliseconds(300)));
|
||||||
|
doubleAnimation.Completed += DoubleAnimation_Completed;
|
||||||
|
MainPageRight.BeginAnimation(WidthProperty, doubleAnimation);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DoubleAnimation_Completed(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MainPageRightMini.Visibility = Visibility.Visible;
|
||||||
|
MainPageRight.Visibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void packIcon_right_restore_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
DoubleAnimation doubleAnimation = new DoubleAnimation(
|
||||||
|
25, 230, new Duration(TimeSpan.FromMilliseconds(300)));
|
||||||
|
MainPageRight.Visibility = Visibility.Visible;
|
||||||
|
MainPageRightMini.Visibility = Visibility.Collapsed;
|
||||||
|
MainPageRight.BeginAnimation(WidthProperty, doubleAnimation);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user