-
The Is there a way I could do that in XAML without having to duplicate a lot of code for each |
Beta Was this translation helpful? Give feedback.
Answered by Slion May 23, 2025
Replies: 1 comment
-
Here is my solution: <c:SettingsCard x:Uid="SettingsCardExcludeFromPeeking"> <c:SettingsCard.Description> <StackPanel Orientation="Vertical"> <TextBlock x:Uid="TextBlockHideWhenPeeking" Visibility="{x:Bind Settings.ExcludeFromPeek, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=True}" /> <TextBlock x:Uid="TextBlockShowWhenPeeking" Visibility="{x:Bind Settings.ExcludeFromPeek, Mode=OneWay}" /> </StackPanel> </c:SettingsCard.Description> <ToggleSwitch IsOn="{x:Bind Settings.ExcludeFromPeek, Mode=TwoWay}" OnContent="" OffContent="" /> </c:SettingsCard> Though converter don't work from window XAML, you need them in a |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by Slion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Here is my solution:
Though converter don't work from window XAML, you …