Skip to content

Commit

Permalink
Disable unchecking of schedule items
Browse files Browse the repository at this point in the history
  • Loading branch information
StijnOostdam committed Dec 20, 2020
1 parent 7c74546 commit 559e972
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
d:DesignHeight="70" d:DesignWidth="450">
<materialDesign:Card Name="Card" Margin="10,0,10,7" Padding="5,5,5,5" DockPanel.Dock="Left" Width="450" Background="#323435" VerticalAlignment="Stretch">
<Grid>
<ToggleButton x:Name="ActiveToggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,12,0,0" Checked="ActiveToggle_Checked"/>
<ToggleButton x:Name="ActiveToggle" Style="{StaticResource MaterialDesignSwitchToggleButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,12,0,0" Checked="ActiveToggle_Checked" Unchecked="ActiveToggle_Unchecked"/>
<Label Content="{Binding Schedule.Name}" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="White" FontSize="20" Height="40" Width="260" Margin="40,5,0,0"/>
<Button VerticalAlignment="Top" Height="35" Padding="0" Background="{x:Null}" BorderBrush="{x:Null}" Click="Edit_Click" Margin="0,7,39,0" HorizontalAlignment="Right" Width="35">
<materialDesign:PackIcon Kind="Pencil" Foreground="White" Height="30" Width="30"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,11 @@ private void ActiveToggle_Checked(object sender, RoutedEventArgs e)
_parent.ActivateSchedule(Schedule);
}
}

private void ActiveToggle_Unchecked(object sender, RoutedEventArgs e)
{
//Disable unchecking
ActiveToggle.IsChecked = true;
}
}
}

0 comments on commit 559e972

Please sign in to comment.