Skip to content

Instantly share code, notes, and snippets.

namespace ConsoleApp1
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;
class Program
Class TextBoxEx
Inherits TextBox
Sub New()
If Tool.IsWin11 Then
Me.BorderStyle = BorderStyle.FixedSingle
End If
End Sub
Protected Overrides Sub OnBorderStyleChanged(e As EventArgs)
// CListCtrlEx
IMPLEMENT_DYNAMIC(CListCtrlEx, CListCtrl)
CListCtrlEx::CListCtrlEx()
{
}
CListCtrlEx::~CListCtrlEx()
{
<Window x:Class="WpfApp39.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp39"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="600">
<Window.Resources>
@gekka
gekka / QnA138091.md
Created October 30, 2020 10:17
Answer code for QnA 138091

[QnA] How to apply animation on ListBoxItem before removal?

<Window x:Class="Gekka.GPL.Sample.WPF.App1.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Gekka.GPL.Sample.WPF.App1" mc:Ignorable="d"
        Title="MainWindow" Height="500" Width="300" >
    <DockPanel TextElement.FontSize="20">
        <Button Content="Test" Click="Button_Click"  DockPanel.Dock="Bottom" />
        <local:DelayRemoveListBox ItemsSource="{Binding}"/>
    </DockPanel>
@gekka
gekka / QnA102861.md
Last active January 5, 2021 09:29
Answer code for QnA 102861

[QnA] WPF DataGrid resizing column causes extreme scrolling

<DataGrid x:Name="TheDataGrid" AutoGenerateColumns="False" >
    <DataGrid.ColumnHeaderStyle>
        <Style TargetType="{x:Type DataGridColumnHeader}">
            <EventSetter Event="FrameworkElement.Loaded" Handler="DataGridColumnHeader_Loaded"/>
        </Style>
    </DataGrid.ColumnHeaderStyle>
    <DataGrid.Columns>