From 375b488be2666cd56e70728624f4eadaefee0440 Mon Sep 17 00:00:00 2001
From: chenghaoran <chenghaoran@ipilotwhale.com>
Date: 星期二, 12 三月 2024 17:36:49 +0800
Subject: [PATCH] 优化项目结构;
---
WPFProject/Controls/IconTabItem.cs | 140 +++++++++++++++++++++++-----------------------
1 files changed, 70 insertions(+), 70 deletions(-)
diff --git a/Controls/IconTabItem.cs b/WPFProject/Controls/IconTabItem.cs
similarity index 99%
rename from Controls/IconTabItem.cs
rename to WPFProject/Controls/IconTabItem.cs
index 559eaa5..1c5faa3 100644
--- a/Controls/IconTabItem.cs
+++ b/WPFProject/Controls/IconTabItem.cs
@@ -1,70 +1,70 @@
-锘縰sing System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-
-namespace WPFProject.Controls
-{
- public class IconTabItem : TabItem, INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void RaisePropertyChanged(string name)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
- }
-
- protected void RaiseAndSetIfChanged<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
- {
- old = @new;
- if (propertyName != null)
- {
- RaisePropertyChanged(propertyName);
- }
- }
-
- public IconTabItem() : base()
- {
- Visibility = Visibility.Collapsed;
- }
-
- private bool _isFont;
- public bool IsFont
- {
- get => _isFont;
- set => _isFont = value;
- }
-
- private Window _Body;
- public Window Body
- {
- get => _Body;
- set => _Body = value;
- }
-
- public BitmapImage Icon
- {
- get { return (BitmapImage)GetValue(IconProperty); }
- set { SetValue(IconProperty, value); }
- }
-
- public static readonly DependencyProperty IconProperty =
- DependencyProperty.Register("Icon", typeof(BitmapImage), typeof(IconTabItem), new PropertyMetadata(
- new BitmapImage(new System.Uri("pack://application:,,,/Resources/Icon/xinzeng_1.png"))));
-
-
- // 鍗旽eader鐨勫瓧浣撳ぇ灏�
- public double HeaderFontSize
- {
- get { return (double)GetValue(HeaderFontSizeProperty); }
- set { SetValue(HeaderFontSizeProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty HeaderFontSizeProperty =
- DependencyProperty.Register("HeaderFontSize", typeof(double), typeof(IconTabItem), new PropertyMetadata(10.0));
-
- }
-}
+锘縰sing System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+
+namespace WPFProject.Controls
+{
+ public class IconTabItem : TabItem, INotifyPropertyChanged
+ {
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void RaisePropertyChanged(string name)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+ }
+
+ protected void RaiseAndSetIfChanged<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
+ {
+ old = @new;
+ if (propertyName != null)
+ {
+ RaisePropertyChanged(propertyName);
+ }
+ }
+
+ public IconTabItem() : base()
+ {
+ Visibility = Visibility.Collapsed;
+ }
+
+ private bool _isFont;
+ public bool IsFont
+ {
+ get => _isFont;
+ set => _isFont = value;
+ }
+
+ private Window _Body;
+ public Window Body
+ {
+ get => _Body;
+ set => _Body = value;
+ }
+
+ public BitmapImage Icon
+ {
+ get { return (BitmapImage)GetValue(IconProperty); }
+ set { SetValue(IconProperty, value); }
+ }
+
+ public static readonly DependencyProperty IconProperty =
+ DependencyProperty.Register("Icon", typeof(BitmapImage), typeof(IconTabItem), new PropertyMetadata(
+ new BitmapImage(new System.Uri("pack://application:,,,/Resources/Icon/xinzeng_1.png"))));
+
+
+ // 鍗旽eader鐨勫瓧浣撳ぇ灏�
+ public double HeaderFontSize
+ {
+ get { return (double)GetValue(HeaderFontSizeProperty); }
+ set { SetValue(HeaderFontSizeProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty HeaderFontSizeProperty =
+ DependencyProperty.Register("HeaderFontSize", typeof(double), typeof(IconTabItem), new PropertyMetadata(10.0));
+
+ }
+}
--
Gitblit v1.9.1