Compare commits
47
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
620ea66b75 | ||
|
|
5707c5b2ee | ||
|
|
dbeaf3b51f | ||
|
|
663bf5365f | ||
|
|
9c5e7d9d34 | ||
|
|
5c03bfbed3 | ||
|
|
7da49f2bf9 | ||
|
|
f5a19ce181 | ||
|
|
c251330f29 | ||
|
|
c475127e15 | ||
|
|
a65ce758fd | ||
|
|
5210623818 | ||
|
|
03acf86fab | ||
|
|
1dbcf13fda | ||
|
|
5f295d10ea | ||
|
|
a3ff25cc73 | ||
|
|
ebfae23a7a | ||
|
|
7fdbe8912b | ||
|
|
b4e58f161d | ||
|
|
11a7f0172d | ||
|
|
f354dc1677 | ||
|
|
48e3928db9 | ||
|
|
85b5a51132 | ||
|
|
b758cac9f9 | ||
|
|
c6a31f7a4d | ||
|
|
145d0606d6 | ||
|
|
253c3b7cd3 | ||
|
|
534d28b038 | ||
|
|
2d088a129f | ||
|
|
5d0e3de573 | ||
|
|
3a04e12b64 | ||
|
|
37188f52a1 | ||
|
|
91f99f7086 | ||
|
|
481bf72489 | ||
|
|
a45112965f | ||
|
|
2c67b06b39 | ||
|
|
fbfbccd6ee | ||
|
|
f90a5f6e0d | ||
|
|
f9fbebea67 | ||
|
|
4f27091fa0 | ||
|
|
effb92fd5d | ||
|
|
8d5c088df0 | ||
|
|
0a56c08d99 | ||
|
|
dc5f74dfc8 | ||
|
|
a63e87883f | ||
|
|
c6b271fb31 | ||
|
|
2bd5731430 |
No files matched your search
@@ -4,7 +4,6 @@ using mbts.ui.controls;
|
||||
using mbts.ui.converters;
|
||||
using mbts.ui.extensions;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using System.Reactive.Linq;
|
||||
using System.Windows;
|
||||
@@ -148,7 +147,7 @@ namespace mbts.ui.spark {
|
||||
|
||||
void _show_popup(object content, object header) {
|
||||
var resources = new AuxiliaryDataResources();
|
||||
resources.MergedDictionaries.Add(new ScrollBarResources());
|
||||
resources.MergedDictionaries.Add(new AutoHideScrollbarResources());
|
||||
_show_popup(content, header, resources);
|
||||
}
|
||||
|
||||
@@ -175,4 +174,4 @@ namespace mbts.ui.spark {
|
||||
}
|
||||
|
||||
class MarketViewRowView : DIYGrid.HighPerformanceRow<MarketViewVM.Row> { }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<ResourceDictionary
|
||||
x:Class="mbts.ui.controls.ScrollBarResources"
|
||||
x:Class="mbts.ui.controls.AutoHideScrollbarResources"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="clr-namespace:mbts.ui"
|
||||
+8
-70
@@ -1,77 +1,15 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.Globalization;
|
||||
using mbts.ui.native;
|
||||
using bts;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Threading.Tasks;
|
||||
using mbts.spark;
|
||||
using mbts.ui.converters;
|
||||
using mbts.ui.converters;
|
||||
using mbts.ui.extensions;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace mbts.ui.controls {
|
||||
partial class ScrollBarResources : ResourceDictionary {
|
||||
static ScrollBarResources() =>
|
||||
IsActiveProperty = IsActivePropertyKey.DependencyProperty;
|
||||
|
||||
public ScrollBarResources() =>
|
||||
partial class AutoHideScrollbarResources : ResourceDictionary {
|
||||
public AutoHideScrollbarResources() =>
|
||||
InitializeComponent();
|
||||
|
||||
#region IsActive
|
||||
static readonly DependencyPropertyKey IsActivePropertyKey =
|
||||
DependencyProperty.RegisterAttachedReadOnly("IsActive", typeof(bool), typeof(ScrollBarResources), new PropertyMetadata(false));
|
||||
|
||||
public static readonly DependencyProperty IsActiveProperty;
|
||||
|
||||
public static bool GetIsActive(DependencyObject d) => (bool)d.GetValue(IsActivePropertyKey.DependencyProperty);
|
||||
static void SetIsActive(DependencyObject d, bool value) => d.SetValue(IsActivePropertyKey, value);
|
||||
#endregion
|
||||
|
||||
#region LastChangeTime
|
||||
static readonly DependencyPropertyKey LastChangeTimePropertyKey =
|
||||
DependencyProperty.RegisterAttachedReadOnly("LastChangeTime", typeof(DateTime), typeof(ScrollBarResources),
|
||||
new PropertyMetadata(DateTime.MinValue, OnLastChangeTimeChanged));
|
||||
|
||||
private static void OnLastChangeTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
|
||||
if (!GetIsActive(d)) {
|
||||
if (e.NewValue is DateTime dt) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty LastChangeTimeProperty;
|
||||
|
||||
public static DateTime GetLastChangeTime(DependencyObject d) => (DateTime)d.GetValue(LastChangeTimePropertyKey.DependencyProperty);
|
||||
static void SetLastChangeTime(DependencyObject d, DateTime value) => d.SetValue(LastChangeTimePropertyKey, value);
|
||||
#endregion
|
||||
|
||||
void ScrollViewer_ScrollChangeTime(object sender, ScrollChangedEventArgs e) {
|
||||
//ScrollViewer scroll_backing = null;
|
||||
//if (e.HorizontalChange != 0) {
|
||||
//}
|
||||
//ScrollViewer scroll() => scroll_backing ?? (scroll_backing = (ScrollViewer)sender);
|
||||
}
|
||||
|
||||
private void PART_VerticalScrollBar_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) {
|
||||
if (sender is ScrollBar sb) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class AutoHideScrollBar : ScrollBar {
|
||||
@@ -5,10 +5,7 @@ using mbts.ui.utility.text;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Reactive.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
@@ -51,7 +48,7 @@ namespace mbts.ui.controls {
|
||||
if (value) {
|
||||
_mouse_over_click_area_op = WorkLoop.Start(
|
||||
$"Evaluate {nameof(HyperlinkCell)} {nameof(IsMouseOverClickArea)}",
|
||||
TimeSpan.FromMilliseconds(10),
|
||||
TimeSpan.FromMilliseconds(100),
|
||||
DispatcherPriority.Input,
|
||||
_on_mouse_changed,
|
||||
WorkLoop.default_excessive_cycle_ratio);
|
||||
@@ -98,6 +95,7 @@ namespace mbts.ui.controls {
|
||||
_border_stroke_pen_backing;
|
||||
|
||||
static HyperlinkCell() {
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(HyperlinkCell), new FrameworkPropertyMetadata(typeof(HyperlinkCell)));
|
||||
IsMouseOverClickAreaProperty = IsMouseOverClickAreaPropertyKey.DependencyProperty;
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(HyperlinkCell), new FrameworkPropertyMetadata(typeof(HyperlinkCell)));
|
||||
WPFHelper.override_metadata<HorizontalAlignment, HyperlinkCell>(
|
||||
|
||||
Reference in new issue
Block a user