首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

在WPF中实现向导进度控制

在WPF中实现向导进度控制,可以使用ProgressRing控件。ProgressRing是一个环形进度条,用于显示执行任务的进度。以下是实现向导进度控制的步骤:

  1. 在WPF应用程序中添加ProgressRing控件。
代码语言:xaml
复制
<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
        xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
        WindowTransitionsEnabled="False"
        mc:Ignorable="d"
        Title="MainWindow"
        Height="450"
        Width="800"
        WindowStartupLocation="CenterScreen"
        Loaded="Window_Loaded"
        Style="{StaticResource DefaultWindow}">

    <Window.DataContext>
        <local:MainWindowViewModel />
    </Window.DataContext>

    <Window.Resources>
        <local:StringToEnumConverter x:Key="StringToEnumConverter"/>
</Window.Resources>

<mah:MetroWindow.RightWindowCommands>
    <mah:WindowCommands>
        <Button x:Name="cmdMinimize"
                Style="{StaticResource WindowMinimizeButton}" />
        <Button x:Name="cmdMaximize"
                Style="{StaticResource WindowMaximizeButton}" />
        <Button x:Name="cmdExit"
                Style="{StaticResource WindowExitButton}" />
    </mah:WindowCommands>
</mah:MetroWindow.RightWindowCommands>

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="auto" />
    </Grid.ColumnDefinitions>

    <Grid.RowDefinitions>
        <RowDefinition Height="auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Panel.ZIndex="1">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal">
            <telerik:RadButton x:Name="cmdAdd"
                                   Margin="80,5"
                                   Padding="20,0"
                                   FontFamily="Arial"
                                   FontSize="14"
                                   ToolTipService.ShowOnDisabled="true">
                <TextBlock Text="添加任务" />
            </telerik:RadButton>
            <telerik:RadButton x:Name="cmdDelete"
                                   Margin="5"
                                   Padding="20,0"
                                   FontFamily="Arial"
                                   FontSize="14"
                                   ToolTipService.ShowOnDisabled="true">
                <TextBlock Text="删除任务" />
            </telerik:RadButton>
        </StackPanel>

        <telerik:RadBusyIndicator x:Name="radBusyIndicator"
                                    Grid.Column="0"
                                    Grid.Row="1"
                                    Margin="80,5,80,175"
                                    IsBusy="{Binding IsBusy}"
                                    BusyContent="{Binding BusyContent}"
                                    FontFamily="Arial"
                                    FontSize="14
页面内容是否对你有帮助?
有帮助
没帮助

相关·内容

16分13秒

06.在ListView中实现.avi

6分31秒

07.在RecyclerView中实现.avi

10分3秒

65-IOC容器在Spring中的实现

13分46秒

16.尚硅谷-IDEA-版本控制在IDEA中的配置和使用.avi

13分46秒

16.尚硅谷-IDEA-版本控制在IDEA中的配置和使用.avi

59分41秒

如何实现产品的“出厂安全”——DevSecOps在云开发运维中的落地实践

13分55秒

day24_集合/09-尚硅谷-Java语言高级-HashMap在JDK7中的底层实现原理

5分47秒

day24_集合/10-尚硅谷-Java语言高级-HashMap在JDK8中的底层实现原理

13分55秒

day24_集合/09-尚硅谷-Java语言高级-HashMap在JDK7中的底层实现原理

5分47秒

day24_集合/10-尚硅谷-Java语言高级-HashMap在JDK8中的底层实现原理

13分55秒

day24_集合/09-尚硅谷-Java语言高级-HashMap在JDK7中的底层实现原理

5分47秒

day24_集合/10-尚硅谷-Java语言高级-HashMap在JDK8中的底层实现原理

扫码

添加站长 进交流群

领取专属 10元无门槛券

手把手带您无忧上云

扫码加入开发者社群

相关资讯

热门标签

活动推荐

    运营活动

    活动名称
    广告关闭
    领券