Skip to content

Commit

Permalink
Disable ToggleSwitch which controls ScreenshottingSettingsViewModel.I…
Browse files Browse the repository at this point in the history
…sEnabled property when Library isn't set to avoid exception (style for disabled state is required); Add StackPanel spacing there
  • Loading branch information
Neakita committed Sep 25, 2024
1 parent 69de6d2 commit 5f27500
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SightKeeper.Avalonia/Annotation/ScreenshottingSettings.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SightKeeper.Avalonia.Annotation.ScreenshottingSettings"
x:DataType="screenshottingOptions:ScreenshottingSettingsViewModel">
<StackPanel>
<ToggleSwitch IsChecked="{Binding IsEnabled}"/>
<StackPanel Classes="regular-spacing">
<ToggleSwitch
IsChecked="{Binding IsEnabled}"
Content="Make Screenshots"
IsEnabled="{Binding Library, Converter={x:Static ObjectConverters.IsNotNull}}"/>
<Slider Maximum="{Binding MaximumWidth}"
Value="{Binding ResolutionWidth}"
TickFrequency="32"
Expand Down

0 comments on commit 5f27500

Please sign in to comment.