---
# System prepended metadata

title: WinUI 3 標準の `ProgressRing` を表示する 2022-11-24
tags: [WinUI 3, ProgressRing]

---

---
lang: ja-jp
breaks: true
---
# WinUI 3 標準の `ProgressRing` を表示する 2022-11-24

<video 
    src="https://user-images.githubusercontent.com/83535794/203688666-580972c4-afd1-4e79-a64a-c922d98b3033.mp4" 
    width="720"
    controls
    >
</video>

## MainWindow.xaml

```xml=
<Window
    x:Class="App1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Button x:Name="myButton" Click="myButton_Click">Click Me</Button>
        </StackPanel>
        <ProgressRing x:Name="progressRing" IsActive="False" Width="300" Height="300" />
    </Grid>
</Window>
```

## MainWindow.xaml.cs

```csharp=
public sealed partial class MainWindow : Window
{
    public MainWindow()
    {
        this.InitializeComponent();
    }

    private void myButton_Click(object sender, RoutedEventArgs e)
    {
        myButton.Content = "Clicked";

        progressRing.IsActive = !progressRing.IsActive;
    }
}
```


###### tags: `WinUI 3` `ProgressRing`
