diff --git a/README-zh.md b/README-zh.md index a68750d3..a2981e41 100644 --- a/README-zh.md +++ b/README-zh.md @@ -118,6 +118,41 @@ xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers" +---------- +### AnimatedGrid + + + +---------- +### GestureUnlock + + + +---------- +### IconicThumbnail + + + +---------- +### Snap + + + +---------- +### NavScrollPanel + + + +---------- +### Gauge + + + +---------- +### Message + + + ---------- ### DateRangePicker diff --git a/README.md b/README.md index c1c44374..7901815d 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,26 @@ xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers" `xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"` +---------- +### AnimatedGrid + + + +---------- +### GestureUnlock + + + +---------- +### IconicThumbnail + + + +---------- +### Snap + + + ---------- ### NavScrollPanel diff --git a/src/Package.props b/src/Package.props index 273f2326..2644d73e 100644 --- a/src/Package.props +++ b/src/Package.props @@ -7,9 +7,9 @@ true snupkg Copyright © WPFDevelopersOrg 2025 - 1.1.0.3 - 1.1.0.3 - 1.1.0.3 + 0.0.0.2 + 0.0.0.2 + 0.0.0.2 https://github.com/WPFDevelopersOrg/WPFDevelopers Debug;Release;Debug-.NET40;Release-.NET40 diff --git a/src/Resources.props b/src/Resources.props index ac35ddcb..7ae435f6 100644 --- a/src/Resources.props +++ b/src/Resources.props @@ -75,6 +75,9 @@ Resources\Images\ZooSemy\1.png + + Resources\Images\IconicThumbnail\%(Filename)%(Extension) + Resources\Audio\HelloWPFDevelopes_en.mp3 diff --git a/src/TargetFrameworks.props b/src/TargetFrameworks.props index ea6ba3f9..68da39e9 100644 --- a/src/TargetFrameworks.props +++ b/src/TargetFrameworks.props @@ -17,7 +17,7 @@ 7.0.0 - 7.0.0 + 5.0.0 @@ -43,7 +43,7 @@ 7.0.0 - 7.0.0 + 4.7.0 \ No newline at end of file diff --git a/src/WPFDevelopers.Net40/Themes/Generic.xaml b/src/WPFDevelopers.Net40/Themes/Generic.xaml index 8fba6634..42892e77 100644 --- a/src/WPFDevelopers.Net40/Themes/Generic.xaml +++ b/src/WPFDevelopers.Net40/Themes/Generic.xaml @@ -17,7 +17,6 @@ - @@ -27,11 +26,6 @@ - - - - + Margin="0,0,-1,0" + HorizontalAlignment="Stretch" + Background="{TemplateBinding TitleBackground}" /> + @@ -85,7 +81,7 @@ Orientation="Horizontal"> - - - - - - - - + + + + diff --git a/src/WPFDevelopers.Samples.Shared/ExampleViews/IconicThumbnailWindowExample.xaml.cs b/src/WPFDevelopers.Samples.Shared/ExampleViews/IconicThumbnailWindowExample.xaml.cs new file mode 100644 index 00000000..396d851f --- /dev/null +++ b/src/WPFDevelopers.Samples.Shared/ExampleViews/IconicThumbnailWindowExample.xaml.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Windows; +using System.Windows.Media.Imaging; +using WPFDevelopers.Helpers; + +namespace WPFDevelopers.Sample.ExampleViews +{ + /// + /// IconicThumbnailWindowExample.xaml 的交互逻辑 + /// + public partial class IconicThumbnailWindowExample + { + private List fileList = new List(); + private int currentFileIndex = -1; + public IconicThumbnailWindowExample() + { + InitializeComponent(); + Loaded += IconicThumbnailWindowExample_Loaded; + } + + private void IconicThumbnailWindowExample_Loaded(object sender, RoutedEventArgs e) + { + fileList.Clear(); + currentFileIndex = -1; + var directorys = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "IconicThumbnail"); + if (!Directory.Exists(directorys)) return; + string[] files = Directory.GetFiles(directorys); + fileList.AddRange(files); + } + + private void BtnPrevious_Click(object sender, RoutedEventArgs e) + { + if (fileList.Count == 0) return; + currentFileIndex = (currentFileIndex + 1) % fileList.Count; + var img = fileList[currentFileIndex]; + ImagePreview.Source = new BitmapImage(new Uri(img)); + this.SetIconicThumbnail(img); + } + private void BtnNext_Click(object sender, RoutedEventArgs e) + { + if (fileList.Count == 0) return; + currentFileIndex = (currentFileIndex - 1 + fileList.Count) % fileList.Count; + var img = fileList[currentFileIndex]; + ImagePreview.Source = new BitmapImage(new Uri(img)); + this.SetIconicThumbnail(img); + } + } +} diff --git a/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/CustomControl/InputBoxBase.cs b/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/CustomControl/InputBoxBase.cs index 126f6446..00c9e120 100644 --- a/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/CustomControl/InputBoxBase.cs +++ b/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/CustomControl/InputBoxBase.cs @@ -73,7 +73,7 @@ private static void OnIconChanged(DependencyObject sender, DependencyPropertyCha { try { - control.ApplyIcon(new BitmapImage(new Uri("pack://application:,,,/ExampleViews/LoginWindow/" + control.Icon))); + control.ApplyIcon(new BitmapImage(new Uri("pack://application:,,,/WPFDevelopers.Samples;component/Resources/Assets/" + control.Icon))); } catch (Exception ex) { diff --git a/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/Generic.xaml b/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/Generic.xaml index dd97f639..e93d6a19 100644 --- a/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/Generic.xaml +++ b/src/WPFDevelopers.Samples.Shared/ExampleViews/LoginWindow/Generic.xaml @@ -61,12 +61,6 @@ - - + + + +