completed the branch
This commit is contained in:
1 parent
7dd3f7183c
commit
029c81438d
9 files changed
+43
-34
No files matched your search
@@ -63,6 +63,12 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||
## Latest examples
|
## Latest examples
|
||||||
|
|
||||||
|
### ImageBlock
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Magnifier
|
### Magnifier
|
||||||
|
|
||||||

|

|
||||||
@@ -75,6 +81,8 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## History publication
|
||||||
|
|
||||||
### Grid
|
### Grid
|
||||||
|
|
||||||

|

|
||||||
@@ -83,8 +91,6 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## History publication
|
|
||||||
|
|
||||||
### NotifyIcon
|
### NotifyIcon
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 220 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 158 KiB |
@@ -5,7 +5,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<AssemblyName>HandyControlDemo</AssemblyName>
|
<AssemblyName>HandyControlDemo</AssemblyName>
|
||||||
<RootNamespace>HandyControlDemo</RootNamespace>
|
<RootNamespace>HandyControlDemo</RootNamespace>
|
||||||
<Version>2.0.0</Version>
|
<Version>2.1.0</Version>
|
||||||
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Copyright>Copyright © HandyOrg 2018-2019</Copyright>
|
<Copyright>Copyright © HandyOrg 2018-2019</Copyright>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<AssemblyName>HandyControl</AssemblyName>
|
<AssemblyName>HandyControl</AssemblyName>
|
||||||
<RootNamespace>HandyControl</RootNamespace>
|
<RootNamespace>HandyControl</RootNamespace>
|
||||||
<Version>2.0.0</Version>
|
<Version>2.1.0</Version>
|
||||||
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
||||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ using System.Windows;
|
|||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||||
[assembly: AssemblyVersion("2.0.0")]
|
[assembly: AssemblyVersion("2.1.0")]
|
||||||
#endif
|
#endif
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
<UserControl x:Class="HandyControlDemo.UserControl.ImageBlockDemoCtl"
|
<UserControl x:Class="HandyControlDemo.UserControl.ImageBlockDemoCtl"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
Background="{DynamicResource RegionBrush}"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||||
<UniformGrid Rows="3" Columns="4">
|
<hc:TransitioningContentControl>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="0" EndColumn="7" EndRow="0" Width="110" Height="128"/>
|
<UniformGrid Rows="3" Columns="4" Margin="32">
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="1" EndColumn="7" EndRow="1" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="0" Width="110" Height="128"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="2" EndColumn="7" EndRow="2" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="1" Width="110" Height="128"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="3" EndColumn="7" EndRow="3" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="2" Width="110" Height="128"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="4" EndColumn="7" EndRow="4" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="3" Width="110" Height="128"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="5" EndColumn="7" EndRow="5" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.1" Columns="8" Rows="10" StartColumn="0" StartRow="4" EndColumn="7" EndRow="4" Width="110" Height="128" IsPlaying="True"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="6" EndColumn="7" EndRow="6" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="5" EndColumn="7" EndRow="5" Width="110" Height="128" IsPlaying="True"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="7" EndColumn="7" EndRow="7" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="6" Width="110" Height="128"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="8" EndColumn="7" EndRow="8" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.1" Columns="8" Rows="10" StartColumn="0" StartRow="7" EndColumn="7" EndRow="7" Width="110" Height="128" IsPlaying="True"/>
|
||||||
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="9" EndColumn="7" EndRow="9" Width="110" Height="128"/>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="8" Width="110" Height="128"/>
|
||||||
</UniformGrid>
|
<hc:ImageBlock Source="/HandyControlDemo;component/Resources/Img/Dance.png" Interval="0:0:0.125" Columns="8" Rows="10" StartColumn="0" StartRow="9" Width="110" Height="128"/>
|
||||||
|
</UniformGrid>
|
||||||
|
</hc:TransitioningContentControl>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -24,25 +24,13 @@ namespace HandyControl.Controls
|
|||||||
Interval = Interval
|
Interval = Interval
|
||||||
};
|
};
|
||||||
_dispatcherTimer.Tick += DispatcherTimer_Tick;
|
_dispatcherTimer.Tick += DispatcherTimer_Tick;
|
||||||
_dispatcherTimer.Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
|
|
||||||
{
|
|
||||||
base.OnRenderSizeChanged(sizeInfo);
|
|
||||||
OnPositionsChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DispatcherTimer_Tick(object sender, EventArgs e) => InvalidateVisual();
|
|
||||||
|
|
||||||
public static readonly DependencyProperty StartColumnProperty = DependencyProperty.Register(
|
|
||||||
"StartColumn", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
|
|
||||||
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged));
|
|
||||||
|
|
||||||
private void OnPositionsChanged()
|
private void OnPositionsChanged()
|
||||||
{
|
{
|
||||||
_indexMin = StartRow * Columns + StartColumn;
|
_indexMin = StartRow * Columns + StartColumn;
|
||||||
_indexMax = EndRow * Columns + EndColumn;
|
_indexMax = EndRow * Columns + EndColumn;
|
||||||
|
_currentIndex = _indexMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnPositionsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnPositionsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
@@ -51,6 +39,12 @@ namespace HandyControl.Controls
|
|||||||
ctl.OnPositionsChanged();
|
ctl.OnPositionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DispatcherTimer_Tick(object sender, EventArgs e) => InvalidateVisual();
|
||||||
|
|
||||||
|
public static readonly DependencyProperty StartColumnProperty = DependencyProperty.Register(
|
||||||
|
"StartColumn", typeof(int), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.Int0Box,
|
||||||
|
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnPositionsChanged));
|
||||||
|
|
||||||
public int StartColumn
|
public int StartColumn
|
||||||
{
|
{
|
||||||
get => (int) GetValue(StartColumnProperty);
|
get => (int) GetValue(StartColumnProperty);
|
||||||
@@ -88,13 +82,20 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty IsPlayingProperty = DependencyProperty.Register(
|
||||||
"IsPlaying", typeof(bool), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.TrueBox,
|
"IsPlaying", typeof(bool), typeof(ImageBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox,
|
||||||
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnIsPlayingChanged));
|
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnIsPlayingChanged));
|
||||||
|
|
||||||
private static void OnIsPlayingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnIsPlayingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
var ctl = (ImageBlock)d;
|
var ctl = (ImageBlock)d;
|
||||||
ctl._dispatcherTimer.IsEnabled = (bool) e.NewValue;
|
if ((bool) e.NewValue)
|
||||||
|
{
|
||||||
|
ctl._dispatcherTimer.Start();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ctl._dispatcherTimer.Stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsPlaying
|
public bool IsPlaying
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
[assembly: AssemblyVersion("2.0.0")]
|
[assembly: AssemblyVersion("2.1.0")]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Controls")]
|
[assembly: XmlnsDefinition("https://handyorg.github.io/handycontrol", "HandyControl.Controls")]
|
||||||
|
|||||||
Reference in new issue
Block a user