Browse Source

轻会员-更换邮箱 Step

OYXH\oyxh 1 năm trước cách đây
mục cha
commit
d91afd748b

+ 142 - 0
PDF Office/CustomControl/StepBar.cs

@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows;
+
+namespace PDF_Master.CustomControl
+{
+    public class StepBarItem : ContentControl
+    {
+        #region 依赖属性定义
+
+        public string Number
+        {
+            get { return (string)GetValue(NumberProperty); }
+            set { SetValue(NumberProperty, value); }
+        }
+
+        public static readonly DependencyProperty NumberProperty =
+            DependencyProperty.Register("Number", typeof(string), typeof(StepBarItem));
+
+        #endregion 依赖属性定义
+
+        #region Constructors
+
+        static StepBarItem()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(StepBarItem), new FrameworkPropertyMetadata(typeof(StepBarItem)));
+        }
+
+        #endregion Constructors
+    }
+
+    public class StepBar : ItemsControl
+    {
+        #region Progress
+
+        public int CurrentIndex
+        {
+            get { return (int)GetValue(CurrentIndexProperty); }
+            set { SetValue(CurrentIndexProperty, value); }
+        }
+
+        public static readonly DependencyProperty CurrentIndexProperty =
+            DependencyProperty.Register("CurrentIndex", typeof(int), typeof(StepBar), new PropertyMetadata(0));
+
+        public Brush ActivateColor
+        {
+            get { return (Brush)GetValue(ActivateColorProperty); }
+            set { SetValue(ActivateColorProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for ActivateColor.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty ActivateColorProperty =
+            DependencyProperty.Register("ActivateColor", typeof(Brush), typeof(StepBar), new PropertyMetadata(new SolidColorBrush(Colors.Green)));
+
+        public Brush UnActivateColor
+        {
+            get { return (Brush)GetValue(UnActivateColorProperty); }
+            set { SetValue(UnActivateColorProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for UnActivateColor.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty UnActivateColorProperty =
+            DependencyProperty.Register("UnActivateColor", typeof(Brush), typeof(StepBar), new PropertyMetadata(new SolidColorBrush(Colors.Gray)));
+
+        /// <summary>
+        /// 线的最小长度
+        /// </summary>
+        public double LineMinLength
+        {
+            get { return (double)GetValue(LineMinLengthProperty); }
+            set { SetValue(LineMinLengthProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for LineMinLength.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty LineMinLengthProperty =
+            DependencyProperty.Register("LineMinLength", typeof(double), typeof(StepBar), new PropertyMetadata(50d));
+
+        public Orientation Orientation
+        {
+            get { return (Orientation)GetValue(OrientationProperty); }
+            set { SetValue(OrientationProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for Orientation.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty OrientationProperty =
+            DependencyProperty.Register("Orientation", typeof(Orientation), typeof(StepBar), new PropertyMetadata(Orientation.Horizontal));
+
+        #endregion Progress
+
+        #region Constructors
+
+        static StepBar()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(StepBar), new FrameworkPropertyMetadata(typeof(StepBar)));
+        }
+
+        #endregion Constructors
+
+        #region Override方法
+
+        protected override DependencyObject GetContainerForItemOverride()
+        {
+            return new StepBarItem();
+        }
+
+        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
+        {
+            //设置Item的显示数字
+            StepBarItem stepBarItem = element as StepBarItem;
+            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(stepBarItem);
+            int index = itemsControl.ItemContainerGenerator.IndexFromContainer(stepBarItem);
+            stepBarItem.Number = Convert.ToString(++index);
+            base.PrepareContainerForItemOverride(element, item);
+        }
+
+        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
+        {
+            base.OnItemsChanged(e);
+
+            //ItemsControl数量变化时,重新设置各个Item的显示的数字
+            for (int i = 0; i < this.Items.Count; i++)
+            {
+                StepBarItem stepBarItem = this.ItemContainerGenerator.ContainerFromIndex(i) as StepBarItem;
+                if (stepBarItem != null)
+                {
+                    int temp = i;
+                    stepBarItem.Number = Convert.ToString(++temp);
+                }
+            }
+            //进度重新回到第一个
+            //this.Progress = 0;
+        }
+
+        #endregion Override方法
+    }
+}

+ 37 - 0
PDF Office/DataConvert/IsLastItemConverter.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace PDF_Master.DataConvert
+{
+    public class IsLastItemConverter : IMultiValueConverter
+    {
+        #region IValueConverter 成员
+
+        public object Convert(object[] value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            ContentControl contentPresenter = value[0] as ContentControl;
+            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(contentPresenter);
+
+            bool flag = false;
+            if (itemsControl != null)
+            {
+                int index = itemsControl.ItemContainerGenerator.IndexFromContainer(contentPresenter);
+                flag = (index == (itemsControl.Items.Count - 1));
+            }
+
+            return flag;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+        }
+
+        #endregion IValueConverter 成员
+    }
+}

+ 67 - 0
PDF Office/DataConvert/IsProgressedConverter.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace PDF_Master.DataConvert
+{
+    public class IsProgressedConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            if ((values[0] is ContentControl && values[1] is int) == false)
+            {
+                return EnumCompare.None;
+            }
+
+            ContentControl contentControl = values[0] as ContentControl;
+            int progress = (int)values[1];
+            ItemsControl itemsControl = ItemsControl.ItemsControlFromItemContainer(contentControl);
+
+            if (itemsControl == null)
+            {
+                return EnumCompare.None;
+            }
+
+            int index = itemsControl.ItemContainerGenerator.IndexFromContainer(contentControl);
+
+            if (index < progress)
+            {
+                return EnumCompare.Less;
+            }
+            else if (index == progress)
+            {
+                return EnumCompare.Equal;
+            }
+            return EnumCompare.Large;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+
+    public enum EnumCompare
+    {
+        /// <summary>
+        /// 小于
+        /// </summary>
+        Less,
+
+        /// <summary>
+        /// 等于
+        /// </summary>
+        Equal,
+
+        /// <summary>
+        /// 大于
+        /// </summary>
+        Large,
+
+        None,
+    }
+}

+ 14 - 0
PDF Office/PDF Master.csproj

@@ -338,6 +338,7 @@
     <Compile Include="CustomControl\ScanViewControl\CustomDraw.cs" />
     <Compile Include="CustomControl\ScanViewControl\CustomPanel.cs" />
     <Compile Include="CustomControl\ScanViewControl\DrawRect.cs" />
+    <Compile Include="CustomControl\StepBar.cs" />
     <Compile Include="CustomControl\SystemControl\CustomCommandAction .cs" />
     <Compile Include="CustomControl\SystemControl\RoutedEventTrigger.cs" />
     <Compile Include="CustomControl\TextBoxEx.cs" />
@@ -365,6 +366,8 @@
     <Compile Include="DataConvert\IntAndTagToBoolMultiBinding.cs" />
     <Compile Include="DataConvert\IntToColorBrush.cs" />
     <Compile Include="DataConvert\InvertBoolConvert.cs" />
+    <Compile Include="DataConvert\IsLastItemConverter.cs" />
+    <Compile Include="DataConvert\IsProgressedConverter.cs" />
     <Compile Include="DataConvert\ListCountToVisible.cs.cs" />
     <Compile Include="DataConvert\LoginBordVis.cs" />
     <Compile Include="DataConvert\ObjectConvert.cs" />
@@ -948,6 +951,9 @@
     <Compile Include="Views\Dialog\Redaction\RepeatMarkDialog.xaml.cs">
       <DependentUpon>RepeatMarkDialog.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Dialog\ServiceDialog\ChangeEmailDialog.xaml.cs">
+      <DependentUpon>ChangeEmailDialog.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Dialog\ServiceDialog\CodeRegion.xaml.cs">
       <DependentUpon>CodeRegion.xaml</DependentUpon>
     </Compile>
@@ -1487,6 +1493,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Styles\StepControlStyle.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Styles\TabControlStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -1775,6 +1785,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Views\Dialog\ServiceDialog\ChangeEmailDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\Dialog\ServiceDialog\CodeRegion.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 266 - 0
PDF Office/Styles/StepControlStyle.xaml

@@ -0,0 +1,266 @@
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:converter="clr-namespace:PDF_Master.DataConvert"
+    xmlns:local="clr-namespace:PDF_Master.CustomControl">
+    <converter:IsLastItemConverter x:Key="IsLastItemConverter" />
+    <converter:IsProgressedConverter x:Key="IsProgressedConverter" />
+
+    <Style TargetType="{x:Type local:StepBarItem}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type local:StepBarItem}">
+                    <Grid>
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="auto" />
+                            <ColumnDefinition Width="*" />
+                        </Grid.ColumnDefinitions>
+                        <StackPanel Orientation="Horizontal">
+
+                            <ContentPresenter VerticalAlignment="Center" Visibility="Collapsed" />
+                            <Grid>
+                                <!--<TextBlock
+                                x:Name="path"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                FontFamily="{StaticResource FontAwesome}"
+                                FontSize="20"
+                                FontWeight="Light"
+                                Foreground="{TemplateBinding Foreground}"
+                                Text="&#xf05d;"
+                                Visibility="Collapsed" />-->
+                                <!--<Button
+                                Name="BtnIcon"
+                                Width="30"
+                                Height="30"
+                                Background="LightBlue"
+                                BorderBrush="Black"
+                                BorderThickness="1"
+                                Content="{Binding Path=Number, RelativeSource={RelativeSource TemplatedParent}}">
+                                <Button.Template>
+                                <ControlTemplate TargetType="Button">
+                                <Border
+                                Background="{TemplateBinding Background}"
+                                BorderBrush="{TemplateBinding BorderBrush}"
+                                BorderThickness="{TemplateBinding BorderThickness}"
+                                CornerRadius="15">
+                                <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
+                                </Border>
+                                </ControlTemplate>
+                                </Button.Template>
+                                </Button>-->
+                                <Ellipse
+                                    Name="BtnIcon"
+                                    Width="24"
+                                    Height="23"
+                                    Fill="LightBlue"
+                                    Stroke="Black"
+                                    StrokeThickness="0" />
+                                <TextBlock
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    FontSize="14"
+                                    Foreground="White"
+                                    Text="{Binding Path=Number, RelativeSource={RelativeSource TemplatedParent}}" />
+                            </Grid>
+                        </StackPanel>
+                        <Border
+                            x:Name="Line"
+                            Grid.Column="1"
+                            MinWidth="{Binding LineMinLength, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                            Margin="0"
+                            VerticalAlignment="Center"
+                            BorderBrush="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                            BorderThickness="0,2,0,0"
+                            SnapsToDevicePixels="True"
+                            UseLayoutRounding="True"
+                            Visibility="Collapsed" />
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <DataTrigger Value="True">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="Visibility" Value="Collapsed" />
+                            <Setter Property="HorizontalAlignment" Value="Left" />
+                        </DataTrigger>
+                        <DataTrigger Value="False">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="Visibility" Value="Visible" />
+                        </DataTrigger>
+                        <DataTrigger Value="Less">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="BorderBrush" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter TargetName="BtnIcon" Property="Fill" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                        </DataTrigger>
+                        <DataTrigger Value="Equal">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter TargetName="BtnIcon" Property="Fill" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                        </DataTrigger>
+                        <DataTrigger Value="Large">
+                            <DataTrigger.Binding>
+                                <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                    <Binding RelativeSource="{RelativeSource Self}" />
+                                    <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                </MultiBinding>
+                            </DataTrigger.Binding>
+                            <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter TargetName="BtnIcon" Property="Fill" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                            <Setter Property="Foreground" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                        </DataTrigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <DataTrigger Binding="{Binding Orientation, RelativeSource={RelativeSource AncestorType=local:StepBar}}" Value="Vertical">
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="{x:Type local:StepBarItem}">
+                            <Grid>
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="auto" />
+                                    <RowDefinition Height="*" />
+                                </Grid.RowDefinitions>
+                                <StackPanel Orientation="Vertical">
+                                    <Grid Margin="0,0,0,0">
+                                        <TextBlock
+                                            x:Name="path"
+                                            HorizontalAlignment="Center"
+                                            VerticalAlignment="Center"
+                                            FontFamily="{StaticResource FontAwesome}"
+                                            FontSize="20"
+                                            FontWeight="Thin"
+                                            Foreground="{TemplateBinding Foreground}"
+                                            Text="&#xf05d;"
+                                            Visibility="Collapsed" />
+                                    </Grid>
+                                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
+                                </StackPanel>
+                                <Border
+                                    x:Name="Line"
+                                    Grid.Row="1"
+                                    MinHeight="{Binding LineMinLength, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                                    Margin="13,0,0,0"
+                                    VerticalAlignment="Center"
+                                    BorderBrush="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}"
+                                    BorderThickness="1,0,0,0"
+                                    SnapsToDevicePixels="True"
+                                    UseLayoutRounding="True"
+                                    Visibility="Collapsed" />
+                            </Grid>
+                            <ControlTemplate.Triggers>
+                                <DataTrigger Value="True">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="Visibility" Value="Collapsed" />
+                                    <Setter Property="HorizontalAlignment" Value="Left" />
+                                </DataTrigger>
+                                <DataTrigger Value="False">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsLastItemConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="Items.Count" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="Visibility" Value="Visible" />
+                                </DataTrigger>
+                                <DataTrigger Value="Less">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="BorderBrush" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                    <Setter TargetName="path" Property="Visibility" Value="Visible" />
+                                    <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                </DataTrigger>
+                                <DataTrigger Value="Equal">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                    <Setter TargetName="path" Property="Visibility" Value="Visible" />
+                                    <Setter Property="Foreground" Value="{Binding ActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                </DataTrigger>
+                                <DataTrigger Value="Large">
+                                    <DataTrigger.Binding>
+                                        <MultiBinding Converter="{StaticResource IsProgressedConverter}">
+                                            <Binding RelativeSource="{RelativeSource Self}" />
+                                            <Binding Path="CurrentIndex" RelativeSource="{RelativeSource AncestorType={x:Type local:StepBar}}" />
+                                        </MultiBinding>
+                                    </DataTrigger.Binding>
+                                    <Setter TargetName="Line" Property="BorderBrush" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                    <Setter TargetName="path" Property="Visibility" Value="Collapsed" />
+                                    <Setter Property="Foreground" Value="{Binding UnActivateColor, RelativeSource={RelativeSource AncestorType=local:StepBar}}" />
+                                </DataTrigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </DataTrigger>
+        </Style.Triggers>
+    </Style>
+
+    <Style TargetType="{x:Type local:StepBar}">
+        <Setter Property="HorizontalAlignment" Value="Left" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type local:StepBar}">
+                    <Border Background="{TemplateBinding Background}">
+                        <ScrollViewer PanningMode="HorizontalOnly" VerticalScrollBarVisibility="Disabled">
+                            <ItemsPresenter />
+                        </ScrollViewer>
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="ItemsPanel">
+            <Setter.Value>
+                <ItemsPanelTemplate>
+                    <StackPanel IsItemsHost="True" Orientation="Horizontal" />
+                </ItemsPanelTemplate>
+            </Setter.Value>
+        </Setter>
+        <Style.Triggers>
+            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Orientation}" Value="Vertical">
+                <Setter Property="ItemsPanel">
+                    <Setter.Value>
+                        <ItemsPanelTemplate>
+                            <StackPanel IsItemsHost="True" Orientation="Vertical" />
+                        </ItemsPanelTemplate>
+                    </Setter.Value>
+                </Setter>
+            </DataTrigger>
+        </Style.Triggers>
+    </Style>
+</ResourceDictionary>

+ 49 - 0
PDF Office/Views/Dialog/ServiceDialog/ChangeEmailDialog.xaml

@@ -0,0 +1,49 @@
+<UserControl
+    x:Class="PDF_Master.Views.Dialog.ServiceDialog.ChangeEmailDialog"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:local="clr-namespace:PDF_Master.Views.Dialog.ServiceDialog"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    d:DesignHeight="420"
+    d:DesignWidth="401"
+    mc:Ignorable="d">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/PDF Master;component/Styles/StepControlStyle.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid>
+        <StackPanel>
+            <customControl:StepBar
+                x:Name="StepBar"
+                Height="200"
+                Margin="20,0"
+                CurrentIndex="0"
+                LineMinLength="30"
+                Orientation="Horizontal">
+                <customControl:StepBarItem>1</customControl:StepBarItem>
+                <customControl:StepBarItem>2</customControl:StepBarItem>
+                <customControl:StepBarItem>3</customControl:StepBarItem>
+                <customControl:StepBarItem>4</customControl:StepBarItem>
+            </customControl:StepBar>
+            <WrapPanel>
+                <Button
+                    Name="BtnNext"
+                    Width="50"
+                    Margin="20"
+                    Click="BtnNext_Click"
+                    Content="下一步" />
+                <Button
+                    Name="BtnPrevious"
+                    Width="50"
+                    Margin="20"
+                    Click="BtnPrevious_Click"
+                    Content="上一步" />
+            </WrapPanel>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 44 - 0
PDF Office/Views/Dialog/ServiceDialog/ChangeEmailDialog.xaml.cs

@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Master.Views.Dialog.ServiceDialog
+{
+    /// <summary>
+    /// ChangeEmailDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class ChangeEmailDialog : UserControl
+    {
+        public ChangeEmailDialog()
+        {
+            InitializeComponent();
+        }
+
+        private void BtnNext_Click(object sender, RoutedEventArgs e)
+        {
+            if (StepBar.Items.Count > 0 && StepBar.CurrentIndex < (StepBar.Items.Count - 1))
+            {
+                StepBar.CurrentIndex++;
+            }
+        }
+
+        private void BtnPrevious_Click(object sender, RoutedEventArgs e)
+        {
+            if (StepBar.Items.Count > 0 && StepBar.CurrentIndex != 0)
+            {
+                StepBar.CurrentIndex--;
+            }
+        }
+    }
+}