1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- namespace HistoryView.Controls;
- public partial class FullConfig : UserControl
- {
- public FullConfig()
- {
- InitializeComponent();
- }
- public TempConfig Source
- {
- get { return (TempConfig)GetValue(SourceProperty); }
- set { SetValue(SourceProperty, value); }
- }
- public static readonly DependencyProperty SourceProperty =
- DependencyProperty.Register("Source", typeof(TempConfig), typeof(FullConfig), new PropertyMetadata(default));
- public ICommand Export
- {
- get { return (ICommand)GetValue(ExportProperty); }
- set { SetValue(ExportProperty, value); }
- }
- public static readonly DependencyProperty ExportProperty =
- DependencyProperty.Register("Export", typeof(ICommand), typeof(FullConfig), new PropertyMetadata(default));
- public ICommand SetAsCurrentConfig
- {
- get { return (ICommand)GetValue(SetAsCurrentConfigProperty); }
- set { SetValue(SetAsCurrentConfigProperty, value); }
- }
- public static readonly DependencyProperty SetAsCurrentConfigProperty =
- DependencyProperty.Register("SetAsCurrentConfig", typeof(ICommand), typeof(FullConfig), new PropertyMetadata(default));
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- foreach (var item in FindVisualChildren.Find<Expander>(this.Items))
- {
- item.IsExpanded = false;
- }
- }
- private void Button_Click_1(object sender, RoutedEventArgs e)
- {
- foreach (var item in FindVisualChildren.Find<Expander>(this.Items))
- {
- item.IsExpanded = true;
- }
- }
- }
|