add more detailed examples of pagination
This commit is contained in:
1 parent
72bb3d1b48
commit
faed201a2c
10 files changed
+161
-26
No files matched your search
@@ -11,7 +11,7 @@ namespace HandyControl.Controls
|
||||
private const string IndicatorTemplateName = "PART_Indicator";
|
||||
|
||||
public static readonly DependencyProperty ArcThicknessProperty = DependencyProperty.Register(
|
||||
"ArcThickness", typeof(double), typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.Double0Box));
|
||||
"ArcThickness", typeof(double), typeof(CircleProgressBar), new PropertyMetadata(.0));
|
||||
|
||||
public static readonly DependencyProperty ShowTextProperty = DependencyProperty.Register(
|
||||
"ShowText", typeof(bool), typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.TrueBox));
|
||||
@@ -20,9 +20,8 @@ namespace HandyControl.Controls
|
||||
|
||||
static CircleProgressBar()
|
||||
{
|
||||
FocusableProperty.OverrideMetadata(typeof(CircleProgressBar),
|
||||
new FrameworkPropertyMetadata(ValueBoxes.FalseBox));
|
||||
MaximumProperty.OverrideMetadata(typeof(CircleProgressBar), new PropertyMetadata(ValueBoxes.Double100Box));
|
||||
FocusableProperty.OverrideMetadata(typeof(CircleProgressBar), new FrameworkPropertyMetadata(ValueBoxes.FalseBox));
|
||||
MaximumProperty.OverrideMetadata(typeof(CircleProgressBar), new FrameworkPropertyMetadata(ValueBoxes.Double100Box));
|
||||
}
|
||||
|
||||
public bool ShowText
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
@@ -218,6 +219,9 @@ namespace HandyControl.Controls
|
||||
public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
|
||||
"ImageSource", typeof(BitmapFrame), typeof(ImageViewer), new PropertyMetadata(default(BitmapFrame)));
|
||||
|
||||
public static readonly DependencyProperty IsFullScreenProperty = DependencyProperty.Register(
|
||||
"IsFullScreen", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
internal static readonly DependencyProperty ImgPathProperty = DependencyProperty.Register(
|
||||
"ImgPath", typeof(string), typeof(ImageViewer), new PropertyMetadata(default(string)));
|
||||
|
||||
@@ -260,6 +264,12 @@ namespace HandyControl.Controls
|
||||
internal static readonly DependencyProperty ShowSmallImgInternalProperty = DependencyProperty.Register(
|
||||
"ShowSmallImgInternal", typeof(bool), typeof(ImageViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
public bool IsFullScreen
|
||||
{
|
||||
get => (bool)GetValue(IsFullScreenProperty);
|
||||
set => SetValue(IsFullScreenProperty, value);
|
||||
}
|
||||
|
||||
public bool ShowImgMap
|
||||
{
|
||||
get => (bool)GetValue(ShowImgMapProperty);
|
||||
@@ -397,7 +407,13 @@ namespace HandyControl.Controls
|
||||
_imageMain = GetTemplateChild(ElementImageMain) as Image;
|
||||
_borderBottom = GetTemplateChild(ElementBorderBottom) as Border;
|
||||
|
||||
if (_imageMain != null) _imageMain.MouseLeftButtonDown += ImageMain_OnMouseLeftButtonDown;
|
||||
if (_imageMain != null)
|
||||
{
|
||||
var t = new RotateTransform();
|
||||
BindingOperations.SetBinding(t, RotateTransform.AngleProperty, new Binding(ImageRotateProperty.Name) {Source = this});
|
||||
_imageMain.LayoutTransform = t;
|
||||
_imageMain.MouseLeftButtonDown += ImageMain_OnMouseLeftButtonDown;
|
||||
}
|
||||
|
||||
if (_canvasSmallImg != null)
|
||||
{
|
||||
@@ -410,11 +426,11 @@ namespace HandyControl.Controls
|
||||
|
||||
private static void OnImageScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (d is ImageViewer ImageViewer && e.NewValue is double newValue)
|
||||
if (d is ImageViewer imageViewer && e.NewValue is double newValue)
|
||||
{
|
||||
ImageViewer.ImageWidth = ImageViewer.ImageOriWidth * newValue;
|
||||
ImageViewer.ImageHeight = ImageViewer.ImageOriHeight * newValue;
|
||||
ImageViewer.ScaleStr = $"{newValue * 100:#0}%";
|
||||
imageViewer.ImageWidth = imageViewer.ImageOriWidth * newValue;
|
||||
imageViewer.ImageHeight = imageViewer.ImageOriHeight * newValue;
|
||||
imageViewer.ScaleStr = $"{newValue * 100:#0}%";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,6 @@ namespace HandyControl.Controls
|
||||
if (d is ScrollViewer ctl && e.NewValue is double v)
|
||||
{
|
||||
ctl.ScrollToHorizontalOffset(v);
|
||||
Console.WriteLine(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,22 +24,19 @@ namespace HandyControl.Expression.Shapes
|
||||
|
||||
public double ArcThickness
|
||||
{
|
||||
get =>
|
||||
(double) GetValue(ArcThicknessProperty);
|
||||
get => (double) GetValue(ArcThicknessProperty);
|
||||
set => SetValue(ArcThicknessProperty, value);
|
||||
}
|
||||
|
||||
public UnitType ArcThicknessUnit
|
||||
{
|
||||
get =>
|
||||
(UnitType) GetValue(ArcThicknessUnitProperty);
|
||||
get => (UnitType) GetValue(ArcThicknessUnitProperty);
|
||||
set => SetValue(ArcThicknessUnitProperty, value);
|
||||
}
|
||||
|
||||
public double EndAngle
|
||||
{
|
||||
get =>
|
||||
(double) GetValue(EndAngleProperty);
|
||||
get => (double) GetValue(EndAngleProperty);
|
||||
set => SetValue(EndAngleProperty, value);
|
||||
}
|
||||
|
||||
@@ -51,8 +48,7 @@ namespace HandyControl.Expression.Shapes
|
||||
|
||||
public double StartAngle
|
||||
{
|
||||
get =>
|
||||
(double) GetValue(StartAngleProperty);
|
||||
get => (double) GetValue(StartAngleProperty);
|
||||
set => SetValue(StartAngleProperty, value);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid x:Name="PART_GridMain" ClipToBounds="True" Grid.RowSpan="2">
|
||||
<Border HorizontalAlignment="Left" VerticalAlignment="Top" Height="{TemplateBinding ImageHeight}" Width="{TemplateBinding ImageWidth}" Margin="{TemplateBinding ImageMargin}">
|
||||
<Image Name="PART_ImageMain" RenderTransformOrigin="0.5,0.5" Source="{TemplateBinding ImageSource}">
|
||||
<Image.LayoutTransform>
|
||||
<RotateTransform Angle="{Binding ImageRotate,RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
</Image.LayoutTransform>
|
||||
</Image>
|
||||
<Image Name="PART_ImageMain" RenderTransformOrigin="0.5,0.5" Source="{TemplateBinding ImageSource}"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<Border Grid.Row="0" Grid.RowSpan="2" Width="252" Height="162" HorizontalAlignment="Right" VerticalAlignment="Bottom" Background="{DynamicResource DarkOpacityBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
||||
@@ -73,7 +69,7 @@
|
||||
</TransformGroup>
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton,Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:ImageBrowser},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"/>
|
||||
<ToggleButton Visibility="{TemplateBinding ShowFullScreenButton,Converter={StaticResource Boolean2VisibilityConverter}}" Foreground="{DynamicResource TextIconBrush}" IsChecked="{Binding IsFullScreen,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}" Margin="12,0,6,0" Style="{StaticResource ToggleButtonIconTransparent}" controls:IconSwitchElement.Geometry="{StaticResource FullScreenGeometry}" controls:IconSwitchElement.GeometrySelected="{StaticResource FullScreenReturnGeometry}" Padding="3"/>
|
||||
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
Reference in new issue
Block a user