๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net9.0</TargetFramework> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> | |
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault> | |
</PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DataGridTemplateColumn.Header> | |
<unit:GdtCheckBox IsThreeState="False" | |
IsChecked="{Binding Path=DataContext.IsAllChecked, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType=DataGrid, Mode=FindAncestor}}"/> | |
</DataGridTemplateColumn.Header> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class MouseUpBehavior : Behavior<FrameworkElement> | |
{ | |
public static readonly DependencyProperty CommandProperty = DependencyProperty.Register( | |
"Command", | |
typeof(ICommand), | |
typeof(MouseUpBehavior), | |
new PropertyMetadata(null)); | |
public ICommand Command | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class MouseMoveBehavior : Behavior<FrameworkElement> | |
{ | |
public static readonly DependencyProperty MouseYProperty = DependencyProperty.Register( | |
"MouseY", | |
typeof(double), | |
typeof(MouseMoveBehavior), | |
new PropertyMetadata(default(double))); | |
public static readonly DependencyProperty MouseXProperty = DependencyProperty.Register( | |
"MouseX", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class CanvasSizeChangedInnerImagePositionBehavior : Behavior<Image> | |
{ | |
public static readonly DependencyProperty LeftProperty = DependencyProperty.Register( | |
"Left", typeof(double), typeof(CanvasSizeChangedInnerImagePositionBehavior), new PropertyMetadata(0.0)); | |
public double Left | |
{ | |
get { return (double)GetValue(LeftProperty); } | |
set { SetValue(LeftProperty, value); } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class ConverterMarkupExtension<T> : MarkupExtension, IValueConverter | |
where T : class, new() | |
{ | |
private static Lazy<T> _converter = new Lazy<T>(() => new T()); | |
public override object ProvideValue(IServiceProvider serviceProvider) | |
{ | |
return _converter.Value; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="WpfApp1.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:local="clr-namespace:WpfApp1" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
Title="MainWindow" | |
Width="800" | |
Height="450" | |
mc:Ignorable="d"> |