diff --git a/PacticeSolution/DataGridEventTriggerSample/MainWindow.xaml b/PacticeSolution/DataGridEventTriggerSample/MainWindow.xaml index ecff841..c144930 100644 --- a/PacticeSolution/DataGridEventTriggerSample/MainWindow.xaml +++ b/PacticeSolution/DataGridEventTriggerSample/MainWindow.xaml @@ -23,7 +23,7 @@ ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Auto"> - + diff --git a/PacticeSolution/DataGridEventTriggerSample/ViewModel/StudentViewModel.cs b/PacticeSolution/DataGridEventTriggerSample/ViewModel/StudentViewModel.cs index 49d51d3..56d7843 100644 --- a/PacticeSolution/DataGridEventTriggerSample/ViewModel/StudentViewModel.cs +++ b/PacticeSolution/DataGridEventTriggerSample/ViewModel/StudentViewModel.cs @@ -16,7 +16,7 @@ namespace DataGridEventTriggerSample.ViewModel { internal class StudentViewModel : Behavior, INotifyPropertyChanged { - public static readonly DependencyProperty MouseDownProperty = DependencyProperty.Register(nameof(MouseDownCommand), typeof(ICommand), typeof(StudentViewModel), new PropertyMetadata(null)); + public static readonly DependencyProperty MouseDoubleClickProperty = DependencyProperty.Register(nameof(MouseDoubleClickCommand), typeof(ICommand), typeof(StudentViewModel), new PropertyMetadata(null)); private ObservableCollection _students; @@ -53,10 +53,10 @@ namespace DataGridEventTriggerSample.ViewModel } - public ICommand MouseDownCommand + public ICommand MouseDoubleClickCommand { - get { return (ICommand)GetValue(MouseDownProperty); } - set { SetValue(MouseDownProperty, value); } + get { return (ICommand)GetValue(MouseDoubleClickProperty); } + set { SetValue(MouseDoubleClickProperty, value); } } protected virtual void OnPropertyChanged(string propertyName) @@ -65,7 +65,7 @@ namespace DataGridEventTriggerSample.ViewModel PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } - public void OnDataGridMouseDown(object sender, MouseEventArgs e) + public void OnDataGridMouseDoubleClick(object sender, MouseEventArgs e) { DataGrid? dataGrid = sender as DataGrid; if (dataGrid == null) @@ -91,12 +91,12 @@ namespace DataGridEventTriggerSample.ViewModel protected override void OnAttached() { - this.AssociatedObject.MouseUp += OnDataGridMouseDown; + this.AssociatedObject.MouseDoubleClick += OnDataGridMouseDoubleClick; } protected override void OnDetaching() { - this.AssociatedObject.MouseUp += OnDataGridMouseDown; + this.AssociatedObject.MouseDoubleClick += OnDataGridMouseDoubleClick; } } } diff --git a/PacticeSolution/ImageLoader/App.xaml b/PacticeSolution/ImageLoader/App.xaml new file mode 100644 index 0000000..b12cf02 --- /dev/null +++ b/PacticeSolution/ImageLoader/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/PacticeSolution/ImageLoader/App.xaml.cs b/PacticeSolution/ImageLoader/App.xaml.cs new file mode 100644 index 0000000..485b1f2 --- /dev/null +++ b/PacticeSolution/ImageLoader/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace ImageLoader +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/PacticeSolution/ImageLoader/AssemblyInfo.cs b/PacticeSolution/ImageLoader/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/PacticeSolution/ImageLoader/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/PacticeSolution/ImageLoader/ImageLoader.csproj b/PacticeSolution/ImageLoader/ImageLoader.csproj new file mode 100644 index 0000000..4106cb0 --- /dev/null +++ b/PacticeSolution/ImageLoader/ImageLoader.csproj @@ -0,0 +1,10 @@ + + + + WinExe + net6.0-windows + enable + true + + + diff --git a/PacticeSolution/ImageLoader/MainWindow.xaml b/PacticeSolution/ImageLoader/MainWindow.xaml new file mode 100644 index 0000000..211199b --- /dev/null +++ b/PacticeSolution/ImageLoader/MainWindow.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + +