调整代码
This commit is contained in:
@@ -466,6 +466,10 @@
|
||||
</Paragraph>
|
||||
</FlowDocument>
|
||||
</RichTextBox>
|
||||
<ms:FlexibleRowPanel>
|
||||
<ms:ChooseBox />
|
||||
<ms:ChooseBox IsEnabled="False" />
|
||||
</ms:FlexibleRowPanel>
|
||||
</StackPanel>
|
||||
<StackPanel ms:ControlAssist.AnchorHeaderText="下拉框 ComboBox">
|
||||
<ms:FlexibleRowPanel>
|
||||
@@ -679,8 +683,16 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<UniformGrid Grid.ColumnSpan="2" Rows="1">
|
||||
<CheckBox x:Name="IsSpining" Content="加载中" />
|
||||
<CheckBox x:Name="ProgressCheckbox" Content="进度待定" />
|
||||
<CheckBox x:Name="ProgressEnable" Content="禁用" />
|
||||
</UniformGrid>
|
||||
<StackPanel Grid.Row="1">
|
||||
<StackPanel Height="100" Orientation="Horizontal">
|
||||
<Slider
|
||||
x:Name="ProgressVerticalSlider"
|
||||
@@ -721,15 +733,17 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Column="1" Panel.ZIndex="10">
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Panel.ZIndex="10">
|
||||
<ms:Spin Spinning="{Binding ElementName=IsSpining, Path=IsChecked}" Tip="加载中...">
|
||||
<StackPanel x:Name="SpinPanel">
|
||||
<CheckBox x:Name="ProgressCheckbox" Content="进度待定" />
|
||||
<Slider
|
||||
x:Name="ProgressSlider"
|
||||
Maximum="100"
|
||||
Minimum="0"
|
||||
Value="25" />
|
||||
Value="50" />
|
||||
<Slider
|
||||
x:Name="ProgressTickSlider"
|
||||
Maximum="100"
|
||||
@@ -765,12 +779,37 @@
|
||||
</ms:Spin>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<UniformGrid Rows="1">
|
||||
<ProgressBar Style="{StaticResource CircularProgressBarStyle}" Value="{Binding ElementName=ProgressSlider, Path=Value}" />
|
||||
<ProgressBar IsIndeterminate="{Binding ElementName=ProgressCheckbox, Path=IsChecked}" Style="{StaticResource CircularProgressBarStyle}" />
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
<ms:WrapPanel Margin="30">
|
||||
<!-- 水平步骤条 -->
|
||||
<ms:StepBar Orientation="Horizontal">
|
||||
<ms:StepBarItem Content="项目创建" />
|
||||
<ms:StepBarItem Content="环境配置" />
|
||||
<ms:StepBarItem Content="代码编写" />
|
||||
<ms:StepBarItem Content="发布部署" />
|
||||
</ms:StepBar>
|
||||
|
||||
<!-- 垂直步骤条 -->
|
||||
<ms:StepBar HorizontalAlignment="Left" Orientation="Vertical">
|
||||
<ms:StepBarItem Content="Step 1: 登录账户" />
|
||||
<ms:StepBarItem Content="Step 2: 验证身份" />
|
||||
<ms:StepBarItem Content="Step 3: 绑定手机" />
|
||||
</ms:StepBar>
|
||||
<Button
|
||||
x:Name="TargetButton"
|
||||
HorizontalAlignment="Center"
|
||||
Content="开始教程" />
|
||||
<Button
|
||||
x:Name="StartBtn"
|
||||
Click="StartBtn_Click"
|
||||
Content="开始" />
|
||||
</ms:WrapPanel>
|
||||
<StackPanel ms:ControlAssist.AnchorHeaderText="文件、文件夹 Browser">
|
||||
<ms:FlexibleRowPanel>
|
||||
<ms:ChooseBox />
|
||||
<ms:ChooseBox IsEnabled="False" />
|
||||
</ms:FlexibleRowPanel>
|
||||
|
||||
<UniformGrid Rows="1">
|
||||
<ms:UploadArea
|
||||
Margin="5"
|
||||
@@ -1107,7 +1146,12 @@
|
||||
</StackPanel>
|
||||
</ms:StackPanel>
|
||||
</ms:Anchor>
|
||||
|
||||
<!-- WPF 的路由事件会自动向上冒泡。因为 TutorialGuide 的 Next 事件是 Bubble 类型,你可以在 UI 层的任何祖先控件上拦截它。 -->
|
||||
<ms:TutorialLayer
|
||||
x:Name="MyTutorial"
|
||||
ms:TutorialGuide.Back="MyTutorial_Back"
|
||||
ms:TutorialGuide.Close="MyTutorial_Close"
|
||||
ms:TutorialGuide.Next="MyTutorial_Next" />
|
||||
<!-- 状态栏部分 -->
|
||||
<StatusBar Grid.Row="2">
|
||||
<TextBlock Text="★" />
|
||||
|
||||
@@ -267,6 +267,8 @@ public partial class MainWindow
|
||||
}
|
||||
|
||||
private bool _loaded = false;
|
||||
private int currentStep;
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e) { _loaded = true; }
|
||||
|
||||
private void Switch_OnClick(object sender, RoutedEventArgs e) { ThemeManager.SwitchThemeMode(); }
|
||||
@@ -419,6 +421,47 @@ public partial class MainWindow
|
||||
};
|
||||
window.ShowDialog();
|
||||
}
|
||||
|
||||
private void MyTutorial_Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("教程已关闭");
|
||||
ShowCurrentStep();
|
||||
}
|
||||
|
||||
private void MyTutorial_Back(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("返回上一步");
|
||||
}
|
||||
|
||||
|
||||
private void StartBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
currentStep = 1;
|
||||
ShowCurrentStep();
|
||||
}
|
||||
|
||||
private void MyTutorial_Next(object sender, RoutedEventArgs e)
|
||||
{
|
||||
currentStep++;
|
||||
ShowCurrentStep();
|
||||
}
|
||||
|
||||
private void ShowCurrentStep()
|
||||
{
|
||||
switch (currentStep)
|
||||
{
|
||||
case 1:
|
||||
MyTutorial.ShowStep(TargetButton, "保存功能", "点击这里可以保存你当前的进度。", "1 / 2");
|
||||
break;
|
||||
case 2:
|
||||
MyTutorial.ShowStep(StartBtn, "删除功能", "谨慎使用,这会清除数据。", "2 / 2");
|
||||
break;
|
||||
|
||||
default:
|
||||
MyTutorial.Close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 数据模型
|
||||
@@ -506,7 +549,7 @@ public class Area
|
||||
{
|
||||
public Area()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public Area(int Id, string Name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user