简体   繁体   中英

C# UWP radiobutton style

I have a problem with radiobutton default style at my UWP application I used default radio button from Windows.UI.Xaml.Controls and its look like: 在此处输入图像描述

I read page about radiobutton at docs.microsoft and there style of radiobutton is another: 在此处输入图像描述

Why my radiobutton is different? I used UWP application,min version Windows 10 Fall Creators(16299), Target version Windows 10(1803,build 17134) My nuget packages: 在此处输入图像描述 I can update them if need

I need something like this for my radiobuttons: 在此处输入图像描述

I read page about radiobutton at docs.microsoft and there style of radiobutton is another

The document style is comes from WinUI library, if you have used Microsoft.UI.Xaml nuget, and add the XamlControlsResources into application xaml, it will update radio button style automatically.

<Application.Resources>
    <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</Application.Resources>

And the dark theme radio button style meet your requirement. For more detail please refer Ge tting started with the Windows UI 2 Library

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM