diff --git a/HandyControl/Controls/Other/ISingleOpen.cs b/HandyControl/Controls/Base/ISingleOpen.cs similarity index 100% rename from HandyControl/Controls/Other/ISingleOpen.cs rename to HandyControl/Controls/Base/ISingleOpen.cs diff --git a/HandyControl/Controls/Base/SimpleItemsControl.cs b/HandyControl/Controls/Base/SimpleItemsControl.cs new file mode 100644 index 00000000..d88cf20d --- /dev/null +++ b/HandyControl/Controls/Base/SimpleItemsControl.cs @@ -0,0 +1,132 @@ +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Markup; + +namespace HandyControl.Controls +{ + [DefaultEvent("OnItemsChanged")] + [DefaultProperty("Items")] + [ContentProperty("Items")] + [TemplatePart(Name = ElementPanel, Type = typeof(Panel))] + public class SimpleItemsControl : Control + { + private const string ElementPanel = "PART_Panel"; + + public static readonly DependencyProperty ItemTemplateProperty = DependencyProperty.Register( + "ItemTemplate", typeof(DataTemplate), typeof(SimpleItemsControl), + new FrameworkPropertyMetadata(default(DataTemplate), OnItemTemplateChanged)); + + public static readonly DependencyProperty ItemContainerStyleProperty = DependencyProperty.Register( + "ItemContainerStyle", typeof(Style), typeof(SimpleItemsControl), + new PropertyMetadata(default(Style), OnItemContainerStyleChanged)); + + public SimpleItemsControl() + { + var items = new ObservableCollection(); + items.CollectionChanged += OnItemsCollectionChanged; + Items = items; + } + + [Bindable(true)] + [Category("Content")] + public Style ItemContainerStyle + { + get => (Style) GetValue(ItemContainerStyleProperty); + set => SetValue(ItemContainerStyleProperty, value); + } + + [Bindable(true)] + public DataTemplate ItemTemplate + { + get => (DataTemplate) GetValue(ItemTemplateProperty); + set => SetValue(ItemTemplateProperty, value); + } + + [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] + [Bindable(true)] + public Collection Items { get; } + + internal Panel ItemsHost { get; set; } + + public override void OnApplyTemplate() + { + ItemsHost?.Children.Clear(); + + base.OnApplyTemplate(); + + ItemsHost = GetTemplateChild(ElementPanel) as Panel; + Refresh(); + } + + private void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + Refresh(); + UpdateItems(); + } + + protected virtual DependencyObject GetContainerForItemOverride() => new ContentPresenter(); + + protected virtual bool IsItemItsOwnContainerOverride(object item) => item is ContentPresenter; + + protected virtual void PrepareContainerForItemOverride(DependencyObject element, object item) + { + switch (element) + { + case ContentControl contentControl: + contentControl.Content = item; + contentControl.ContentTemplate = ItemTemplate; + break; + case ContentPresenter contentPresenter: + contentPresenter.Content = item; + contentPresenter.ContentTemplate = ItemTemplate; + break; + } + } + + private static void OnItemTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var target = d as SimpleItemsControl; + target?.Refresh(); + } + + private static void OnItemContainerStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var target = d as SimpleItemsControl; + target?.Refresh(); + } + + protected virtual void Refresh() + { + if (ItemsHost == null) return; + + ItemsHost.Children.Clear(); + foreach (var item in Items) + { + DependencyObject container; + if (IsItemItsOwnContainerOverride(item)) + { + container = item as DependencyObject; + } + else + { + container = GetContainerForItemOverride(); + PrepareContainerForItemOverride(container, item); + } + + if (container is FrameworkElement element) + { + element.Style = ItemContainerStyle; + ItemsHost.Children.Add(element); + } + } + } + + protected virtual void UpdateItems() + { + + } + } +} \ No newline at end of file diff --git a/HandyControl/Controls/CoverView/CoverView.cs b/HandyControl/Controls/CoverView/CoverView.cs index 72d529b4..12e65563 100644 --- a/HandyControl/Controls/CoverView/CoverView.cs +++ b/HandyControl/Controls/CoverView/CoverView.cs @@ -1,9 +1,219 @@ -using System.Windows.Controls; +using System.Windows; +using System.Windows.Data; +using HandyControl.Data; namespace HandyControl.Controls { - public class CoverView : ItemsControl + public class CoverView : SimpleItemsControl { - + private readonly CoverViewContent _viewContent; + + private CoverViewItem _selectedItem; + + public CoverView() + { + _viewContent = new CoverViewContent {ContentHeight = ItemContentHeight}; + + AddHandler(CoverViewItem.SelectedEvent, new RoutedEventHandler(CoverViewItem_OnSelected)); + _viewContent.SetBinding(WidthProperty, new Binding(ActualWidthProperty.Name) { Source = this }); + } + + private void CoverViewItem_OnSelected(object sender, RoutedEventArgs e) + { + if (e.OriginalSource is CoverViewItem item) + { + if (_selectedItem == null) + { + item.IsSelected = true; + _selectedItem = item; + if (_viewContent != null) + { + _viewContent.Content = item.Content; + UpdateCoverViewContent(true); + } + + return; + } + + if(!Equals(_selectedItem, item)) + { + _selectedItem.IsSelected = false; + item.IsSelected = true; + _selectedItem = item; + if (_viewContent != null) + { + _viewContent.Content = item.Content; + UpdateCoverViewContent(true); + } + + return; + } + + if (_viewContent != null) + { + _viewContent.Content = null; + UpdateCoverViewContent(false); + } + _selectedItem.IsSelected = false; + _selectedItem = null; + } + } + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + if (_viewContent.Style == null) + { + _viewContent.Style = CoverViewContentStyle; + } + + if (_selectedItem != null) + { + UpdateCoverViewContent(_selectedItem != null); + } + } + + protected override DependencyObject GetContainerForItemOverride() => new CoverViewItem(); + + protected override bool IsItemItsOwnContainerOverride(object item) => item is CoverViewItem; + + public static readonly DependencyProperty CoverViewContentStyleProperty = DependencyProperty.Register( + "CoverViewContentStyle", typeof(Style), typeof(CoverView), new PropertyMetadata(default(Style))); + + public Style CoverViewContentStyle + { + get => (Style) GetValue(CoverViewContentStyleProperty); + set => SetValue(CoverViewContentStyleProperty, value); + } + + public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register( + "ItemWidth", typeof(double), typeof(CoverView), new PropertyMetadata(ValueBoxes.Double200Box)); + + public double ItemWidth + { + get => (double) GetValue(ItemWidthProperty); + set => SetValue(ItemWidthProperty, value); + } + + public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register( + "ItemHeight", typeof(double), typeof(CoverView), new PropertyMetadata(ValueBoxes.Double200Box)); + + public double ItemHeight + { + get => (double) GetValue(ItemHeightProperty); + set => SetValue(ItemHeightProperty, value); + } + + public static readonly DependencyProperty ItemMarginProperty = DependencyProperty.Register( + "ItemMargin", typeof(Thickness), typeof(CoverView), new PropertyMetadata(default(Thickness))); + + public Thickness ItemMargin + { + get => (Thickness) GetValue(ItemMarginProperty); + set => SetValue(ItemMarginProperty, value); + } + + internal static readonly DependencyProperty GroupsProperty = DependencyProperty.Register( + "Groups", typeof(int), typeof(CoverView), new FrameworkPropertyMetadata(ValueBoxes.Int5Box, FrameworkPropertyMetadataOptions.AffectsMeasure, OnGroupsChanged), IsGroupsValid); + + internal static void OnGroupsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + if (d is CoverView ctl) + { + ctl.UpdateCoverViewContent(ctl._viewContent.IsOpen); + } + } + + private static bool IsGroupsValid(object value) + { + var v = (int)value; + return v >= 1; + } + + public int Groups + { + get => (int)GetValue(GroupsProperty); + set => SetValue(GroupsProperty, value); + } + + public static readonly DependencyProperty ItemContentHeightProperty = DependencyProperty.Register( + "ItemContentHeight", typeof(double), typeof(CoverView), new PropertyMetadata(ValueBoxes.Double300Box)); + + public double ItemContentHeight + { + get => (double) GetValue(ItemContentHeightProperty); + set => SetValue(ItemContentHeightProperty, value); + } + + protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) + { + base.OnRenderSizeChanged(sizeInfo); + + Groups = (int)(sizeInfo.NewSize.Width / (ItemWidth + ItemMargin.Left + ItemMargin.Right)); + } + + protected override void Refresh() + { + if (ItemsHost == null) return; + + ItemsHost.Children.Clear(); + var index = 0; + foreach (var item in Items) + { + DependencyObject container; + if (IsItemItsOwnContainerOverride(item)) + { + container = item as DependencyObject; + } + else + { + container = GetContainerForItemOverride(); + PrepareContainerForItemOverride(container, item); + } + + if (container is CoverViewItem element) + { + element.Index = index++; + element.Style = ItemContainerStyle; + ItemsHost.Children.Add(element); + } + } + } + + /// + /// 更新内容视图 + /// + private void UpdateCoverViewContent(bool isOpen) + { + if (_selectedItem == null) return; + + ItemsHost.Children.Remove(_viewContent); + + var total = Items.Count + 1; + var totalRow = total / Groups + (total % Groups > 0 ? 1 : 0); + if (total <= Groups) + { + ItemsHost.Children.Add(_viewContent); + } + else + { + var row = _selectedItem.Index / Groups + 1; + if (row == totalRow) + { + ItemsHost.Children.Add(_viewContent); + } + else + { + ItemsHost.Children.Insert(row * Groups, _viewContent); + } + } + + _viewContent.UpdatePosition(_selectedItem.Index, Groups, _selectedItem.DesiredSize.Width); + if (_viewContent.CanSwitch) + { + _viewContent.IsOpen = isOpen; + } + } } } \ No newline at end of file diff --git a/HandyControl/Controls/CoverView/CoverViewContent.cs b/HandyControl/Controls/CoverView/CoverViewContent.cs new file mode 100644 index 00000000..18d70400 --- /dev/null +++ b/HandyControl/Controls/CoverView/CoverViewContent.cs @@ -0,0 +1,100 @@ +using System.Windows; +using System.Windows.Controls; +using HandyControl.Data; +using HandyControl.Tools; +using HandyControl.Tools.Extension; + +namespace HandyControl.Controls +{ + [TemplatePart(Name = ElementTriangle, Type = typeof(FrameworkElement))] + [TemplatePart(Name = ElementContent, Type = typeof(FrameworkElement))] + internal class CoverViewContent : ContentControl + { + private const string ElementTriangle = "PART_Triangle"; + + private const string ElementContent = "PART_Content"; + + private FrameworkElement _triangle; + + private FrameworkElement _content; + + internal bool WaitForUpdate { get; set; } + + private int _index; + + private int _groups; + + private double _itemWidth; + + private bool _isOpen; + + internal bool CanSwitch { get; set; } = true; + + internal bool IsOpen + { + get => _isOpen; + set + { + if (_isOpen == value) return; + _isOpen = value; + OpenSwitch(value); + } + } + + public static readonly DependencyProperty ContentHeightProperty = DependencyProperty.Register( + "ContentHeight", typeof(double), typeof(CoverViewContent), new PropertyMetadata(ValueBoxes.Double300Box)); + + public double ContentHeight + { + get => (double) GetValue(ContentHeightProperty); + set => SetValue(ContentHeightProperty, value); + } + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _triangle = GetTemplateChild(ElementTriangle) as FrameworkElement; + _content = GetTemplateChild(ElementContent) as FrameworkElement; + + if (WaitForUpdate) + { + _triangle.BeginAnimation(MarginProperty, AnimationHelper.CreateAnimation(new Thickness((_index % _groups + .5) * _itemWidth - _triangle.Width / 2, 0, 0, 0))); + OpenSwitch(_isOpen); + WaitForUpdate = false; + } + } + + internal void UpdatePosition(int index, int groups, double itemWidth) + { + if (_triangle == null) + { + _index = index; + _groups = groups; + _itemWidth = itemWidth; + WaitForUpdate = true; + return; + } + _triangle.BeginAnimation(MarginProperty, AnimationHelper.CreateAnimation(new Thickness((index % groups + .5) * itemWidth - _triangle.Width / 2, 0, 0, 0))); + } + + private void OpenSwitch(bool isOpen) + { + if (_content == null) return; + var animation = AnimationHelper.CreateAnimation(isOpen ? ContentHeight : 0); + _triangle.Show(false); + this.Show(true); + animation.Completed += (s, e) => + { + CanSwitch = true; + this.Show(IsOpen); + if (IsOpen) + { + _triangle.Show(true); + } + }; + CanSwitch = false; + _content.BeginAnimation(HeightProperty, animation); + } + } +} \ No newline at end of file diff --git a/HandyControl/Controls/CoverView/CoverViewItem.cs b/HandyControl/Controls/CoverView/CoverViewItem.cs index ee9cc718..986f59fc 100644 --- a/HandyControl/Controls/CoverView/CoverViewItem.cs +++ b/HandyControl/Controls/CoverView/CoverViewItem.cs @@ -1,9 +1,58 @@ -using System.Windows.Controls; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using HandyControl.Data; namespace HandyControl.Controls { public class CoverViewItem : HeaderedContentControl { - + private bool _isMouseLeftButtonDown; + + protected override void OnMouseLeave(MouseEventArgs e) + { + base.OnMouseLeave(e); + + _isMouseLeftButtonDown = false; + } + + protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) + { + base.OnMouseLeftButtonDown(e); + + _isMouseLeftButtonDown = true; + } + + protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) + { + base.OnMouseLeftButtonUp(e); + + if (_isMouseLeftButtonDown) + { + RaiseEvent(new RoutedEventArgs(SelectedEvent, this)); + _isMouseLeftButtonDown = false; + } + } + + public static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register( + "IsSelected", typeof(bool), typeof(CoverViewItem), new PropertyMetadata(ValueBoxes.FalseBox)); + + public bool IsSelected + { + internal get => (bool) GetValue(IsSelectedProperty); + set => SetValue(IsSelectedProperty, value); + } + + public static readonly RoutedEvent SelectedEvent = + EventManager.RegisterRoutedEvent("Selected", RoutingStrategy.Bubble, + typeof(RoutedEventHandler), typeof(CoverViewItem)); + + public event RoutedEventHandler Selected + { + add => AddHandler(SelectedEvent, value); + remove => RemoveHandler(SelectedEvent, value); + } + + internal int Index { get; set; } } } \ No newline at end of file diff --git a/HandyControl/Controls/Other/InternalCanvas.cs b/HandyControl/Controls/Internal/InternalCanvas.cs similarity index 100% rename from HandyControl/Controls/Other/InternalCanvas.cs rename to HandyControl/Controls/Internal/InternalCanvas.cs diff --git a/HandyControl/Controls/Rate/Rate.cs b/HandyControl/Controls/Rate/Rate.cs index d35524f0..95b9af84 100644 --- a/HandyControl/Controls/Rate/Rate.cs +++ b/HandyControl/Controls/Rate/Rate.cs @@ -1,6 +1,5 @@ using System.Linq; using System.Windows; -using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using HandyControl.Data; @@ -8,7 +7,7 @@ using HandyControl.Tools; namespace HandyControl.Controls { - public class Rate : ItemsControl + public class Rate : SimpleItemsControl { public static readonly DependencyProperty ItemMarginProperty = DependencyProperty.Register( "ItemMargin", typeof(Thickness), typeof(Rate), new PropertyMetadata(default(Thickness))); @@ -179,8 +178,6 @@ namespace HandyControl.Controls public override void OnApplyTemplate() { - base.OnApplyTemplate(); - if (!_isLoaded) { Items.Clear(); @@ -193,6 +190,8 @@ namespace HandyControl.Controls }); } } + + base.OnApplyTemplate(); } protected override void OnMouseLeave(MouseEventArgs e) diff --git a/HandyControl/Controls/Rate/RateItem.cs b/HandyControl/Controls/Rate/RateItem.cs index ee50ffa3..3a297fb6 100644 --- a/HandyControl/Controls/Rate/RateItem.cs +++ b/HandyControl/Controls/Rate/RateItem.cs @@ -78,6 +78,7 @@ namespace HandyControl.Controls { if (_isHalf == value) return; _isHalf = value; + if (_icon == null) return; _icon.Width = value ? ActualWidth / 2 : ActualWidth; } } @@ -93,7 +94,7 @@ namespace HandyControl.Controls private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var ctl = (RateItem) d; - ctl._icon.Show((bool) e.NewValue); + ctl._icon?.Show((bool) e.NewValue); } public event RoutedEventHandler SelectedChanged diff --git a/HandyControl/Controls/TabControl/TabControl.cs b/HandyControl/Controls/TabControl/TabControl.cs index 97a12f73..6967947d 100644 --- a/HandyControl/Controls/TabControl/TabControl.cs +++ b/HandyControl/Controls/TabControl/TabControl.cs @@ -6,7 +6,6 @@ using System.Windows.Controls.Primitives; using HandyControl.Data; using HandyControl.Tools.Extension; -// ReSharper disable once CheckNamespace namespace HandyControl.Controls { [TemplatePart(Name = OverflowButtonKey, Type = typeof(ContextMenuToggleButton))] diff --git a/HandyControl/Controls/TabControl/TabItem.cs b/HandyControl/Controls/TabControl/TabItem.cs index 80593e88..a3079b53 100644 --- a/HandyControl/Controls/TabControl/TabItem.cs +++ b/HandyControl/Controls/TabControl/TabItem.cs @@ -8,7 +8,6 @@ using System.Windows.Media.Animation; using HandyControl.Interactivity; using HandyControl.Tools; -// ReSharper disable once CheckNamespace namespace HandyControl.Controls { public class TabItem : System.Windows.Controls.TabItem diff --git a/HandyControl/Controls/TabControl/TabPanel.cs b/HandyControl/Controls/TabControl/TabPanel.cs index f90c7bf1..24583074 100644 --- a/HandyControl/Controls/TabControl/TabPanel.cs +++ b/HandyControl/Controls/TabControl/TabPanel.cs @@ -6,7 +6,6 @@ using System.Windows.Media; using HandyControl.Data; using HandyControl.Tools; -// ReSharper disable once CheckNamespace namespace HandyControl.Controls { public class TabPanel : Panel diff --git a/HandyControl/Data/ValueBoxes.cs b/HandyControl/Data/ValueBoxes.cs index 9954517f..b2fb35dc 100644 --- a/HandyControl/Data/ValueBoxes.cs +++ b/HandyControl/Data/ValueBoxes.cs @@ -19,6 +19,8 @@ internal static object Double200Box = 200.0; + internal static object Double300Box = 300.0; + internal static object DoubleNeg1Box = -1.0; internal static object Int0Box = 0; diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj index ee5de855..08d93472 100644 --- a/HandyControl/HandyControl.csproj +++ b/HandyControl/HandyControl.csproj @@ -117,6 +117,8 @@ + + @@ -156,7 +158,7 @@ - + @@ -168,7 +170,7 @@ - + @@ -649,6 +651,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml b/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml index 3e872520..f82af0c0 100644 --- a/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml +++ b/HandyControl/Themes/Styles/Base/CoverViewBaseStyle.xaml @@ -3,11 +3,72 @@ xmlns:controls="clr-namespace:HandyControl.Controls"> + \ No newline at end of file diff --git a/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml b/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml index 95c61199..16835414 100644 --- a/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml +++ b/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml @@ -60,10 +60,6 @@ - - - - + + \ No newline at end of file diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj index 21f1785f..a051215e 100644 --- a/HandyControlDemo/HandyControlDemo.csproj +++ b/HandyControlDemo/HandyControlDemo.csproj @@ -685,6 +685,16 @@ TextTemplatingFileGenerator MessageToken.cs + + + + + + + + + + diff --git a/HandyControlDemo/Resources/Img/Album/1.jpg b/HandyControlDemo/Resources/Img/Album/1.jpg new file mode 100644 index 00000000..d2130c4b Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/1.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/10.jpg b/HandyControlDemo/Resources/Img/Album/10.jpg new file mode 100644 index 00000000..198ed9ae Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/10.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/2.jpg b/HandyControlDemo/Resources/Img/Album/2.jpg new file mode 100644 index 00000000..aac4ecda Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/2.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/3.jpg b/HandyControlDemo/Resources/Img/Album/3.jpg new file mode 100644 index 00000000..535b7255 Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/3.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/4.jpg b/HandyControlDemo/Resources/Img/Album/4.jpg new file mode 100644 index 00000000..575fa6dd Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/4.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/5.jpg b/HandyControlDemo/Resources/Img/Album/5.jpg new file mode 100644 index 00000000..fc2960ef Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/5.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/6.jpg b/HandyControlDemo/Resources/Img/Album/6.jpg new file mode 100644 index 00000000..0435b4fe Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/6.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/7.jpg b/HandyControlDemo/Resources/Img/Album/7.jpg new file mode 100644 index 00000000..bbfa016d Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/7.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/8.jpg b/HandyControlDemo/Resources/Img/Album/8.jpg new file mode 100644 index 00000000..bea683db Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/8.jpg differ diff --git a/HandyControlDemo/Resources/Img/Album/9.jpg b/HandyControlDemo/Resources/Img/Album/9.jpg new file mode 100644 index 00000000..64dbad18 Binary files /dev/null and b/HandyControlDemo/Resources/Img/Album/9.jpg differ diff --git a/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml index d2302a54..8d52fb5f 100644 --- a/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml +++ b/HandyControlDemo/UserControl/Controls/CoverViewDemoCtl.xaml @@ -2,12 +2,90 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl" - xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl" + xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs" Background="{DynamicResource RegionBrush}"> - - -