Skip to content

Create CheckBoxWithDescription in XAML #30676

Open
@Jay-o-Way

Description

Check out this branch: github.com/Jay-o-Way/PowerToys/tree/CheckBoxWithDescription (w.i.p.)
@niels9001 Seems to work fine, but there are quite some errors in the Error List...

Just have to look into if it's better to create a user control or a template control.

Concept

	<?xml version="1.0" encoding="utf-8" ?>
<UserControl
	  x:Class="Microsoft.PowerToys.Settings.UI.Controls.CheckBoxWithDescription"
	  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:local="using:Microsoft.PowerToys.Settings.UI.Controls"
	  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	    mc:Ignorable="d">

	  <Grid>
		<CheckBox>
		    <CheckBox.Content>
			<StackPanel>
			    <TextBlock Text="{x:Bind Header, FallbackValue=''}" TextWrapping="WrapWholeWords" />
			    <TextBlock Style="{ThemeResource CaptionTextBlockStyle}" Text="{x:Bind Description, FallbackValue=''}" />
			</StackPanel>
		    </CheckBox.Content>
		</CheckBox>
	  </Grid>
</UserControl>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-BuildIssues pertaining to the build system, CI, infrastructure, metaProduct-SettingsThe standalone PowerToys Settings application

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions