Skip to content

Commit

Permalink
V4.4.0 Released
Browse files Browse the repository at this point in the history
  • Loading branch information
XceedBoucherS committed Aug 12, 2022
1 parent ab7333a commit b5ce95e
Show file tree
Hide file tree
Showing 994 changed files with 9,686 additions and 5,120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
Copyright (C) 2007-2022 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
Expand All @@ -15,12 +15,7 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
***********************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;

namespace Xceed.Wpf.AvalonDock.Themes
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
Copyright (C) 2007-2022 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
Expand All @@ -16,9 +16,6 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
***********************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xceed.Wpf.AvalonDock.Themes
{
Expand All @@ -28,6 +25,11 @@ public override Uri GetResourceUri()
{
string assemblyName = "Xceed.Wpf.AvalonDock.Themes.Aero";

#if NETCORE
assemblyName += ".NETCore";
#elif NET5
assemblyName += ".NET5";
#endif

return new Uri(
"/" + assemblyName + ";component/Theme.xaml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
Copyright (C) 2007-2022 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
Copyright (C) 2007-2022 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
Expand All @@ -15,148 +15,162 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
***********************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Xceed.Wpf.AvalonDock.Themes.Controls
{
public class SplineBorder : Control
public class SplineBorder : Control
{

public SplineBorder()
{
//RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
}


#region Thickness

/// <summary>
/// Thickness Dependency Property
/// </summary>
public static readonly DependencyProperty ThicknessProperty =
DependencyProperty.Register( "Thickness", typeof( double ), typeof( SplineBorder ),
new FrameworkPropertyMetadata( ( double )1.0, FrameworkPropertyMetadataOptions.AffectsRender ) );

/// <summary>
/// Gets or sets the Thickness property. This dependency property
/// indicates the border thickness.
/// </summary>
public double Thickness
{
get
{
return ( double )GetValue( ThicknessProperty );
}
set
{
SetValue( ThicknessProperty, value );
}
}

#endregion

#region Fill

/// <summary>
/// Fill Dependency Property
/// </summary>
public static readonly DependencyProperty FillProperty =
DependencyProperty.Register( "Fill", typeof( Brush ), typeof( SplineBorder ),
new FrameworkPropertyMetadata( ( Brush )null, FrameworkPropertyMetadataOptions.AffectsRender ) );

/// <summary>
/// Gets or sets the Fill property. This dependency property
/// indicates the fill color.
/// </summary>
public Brush Fill
{
get
{
return ( Brush )GetValue( FillProperty );
}
set
{
SetValue( FillProperty, value );
}
}

#endregion

#region Stroke

/// <summary>
/// Stroke Dependency Property
/// </summary>
public static readonly DependencyProperty StrokeProperty =
DependencyProperty.Register( "Stroke", typeof( Brush ), typeof( SplineBorder ),
new FrameworkPropertyMetadata( Brushes.Black, FrameworkPropertyMetadataOptions.AffectsRender ) );

/// <summary>
/// Gets or sets the Stroke property. This dependency property
/// indicates the stroke brush.
/// </summary>
public Brush Stroke
{
get
{
return ( Brush )GetValue( StrokeProperty );
}
set
{
SetValue( StrokeProperty, value );
}
}

#endregion

#region BottomBorderMargin

/// <summary>
/// BottomBorderMargin Dependency Property
/// </summary>
public static readonly DependencyProperty BottomBorderMarginProperty =
DependencyProperty.Register( "BottomBorderMargin", typeof( double ), typeof( SplineBorder ),
new FrameworkPropertyMetadata( ( double )0.0, FrameworkPropertyMetadataOptions.AffectsRender ) );

/// <summary>
/// Gets or sets the BottomBorderMargin property. This dependency property
/// indicates the adjustment for the bottom margin.
/// </summary>
public double BottomBorderMargin
{
get
{
return ( double )GetValue( BottomBorderMarginProperty );
}
set
{
SetValue( BottomBorderMarginProperty, value );
}
}

#endregion



protected override void OnRender( DrawingContext drawingContext )
{
var pgFill = new PathGeometry();
var pfFill = new PathFigure() { IsFilled = true, IsClosed = true };
pfFill.StartPoint = new Point( ActualWidth, 0.0 );

var q1Fill = new QuadraticBezierSegment() { Point1 = new Point( ActualWidth * 2 / 3, 0.0 ), Point2 = new Point( ActualWidth / 2.0, ActualHeight / 2.0 ), IsStroked = false };
pfFill.Segments.Add( q1Fill );
var q2Fill = new QuadraticBezierSegment() { Point1 = new Point( ActualWidth / 3, ActualHeight ), Point2 = new Point( 0, ActualHeight ), IsStroked = false };
pfFill.Segments.Add( q2Fill );

pfFill.Segments.Add( new LineSegment() { Point = new Point( ActualWidth, ActualHeight ), IsStroked = false } );

pgFill.Figures.Add( pfFill );

drawingContext.DrawGeometry( Fill, null, pgFill );

var pgBorder = new PathGeometry();
var pfBorder = new PathFigure() { IsFilled = false, IsClosed = false };
pfBorder.StartPoint = new Point( ActualWidth, Thickness / 2 );

var q1Border = new QuadraticBezierSegment() { Point1 = new Point( ActualWidth * 2 / 3, 0.0 ), Point2 = new Point( ActualWidth / 2.0, ActualHeight / 2.0 ) };
pfBorder.Segments.Add( q1Border );
var q2Border = new QuadraticBezierSegment() { Point1 = new Point( ActualWidth / 3, ActualHeight ), Point2 = new Point( 0.0, ActualHeight - BottomBorderMargin ) };
pfBorder.Segments.Add( q2Border );

pgBorder.Figures.Add( pfBorder );

public SplineBorder()
{
//RenderOptions.SetEdgeMode(this, EdgeMode.Aliased);
}


#region Thickness

/// <summary>
/// Thickness Dependency Property
/// </summary>
public static readonly DependencyProperty ThicknessProperty =
DependencyProperty.Register("Thickness", typeof(double), typeof(SplineBorder),
new FrameworkPropertyMetadata((double)1.0, FrameworkPropertyMetadataOptions.AffectsRender));

/// <summary>
/// Gets or sets the Thickness property. This dependency property
/// indicates the border thickness.
/// </summary>
public double Thickness
{
get { return (double)GetValue(ThicknessProperty); }
set { SetValue(ThicknessProperty, value); }
}

#endregion

#region Fill

/// <summary>
/// Fill Dependency Property
/// </summary>
public static readonly DependencyProperty FillProperty =
DependencyProperty.Register("Fill", typeof(Brush), typeof(SplineBorder),
new FrameworkPropertyMetadata((Brush)null, FrameworkPropertyMetadataOptions.AffectsRender));

/// <summary>
/// Gets or sets the Fill property. This dependency property
/// indicates the fill color.
/// </summary>
public Brush Fill
{
get { return (Brush)GetValue(FillProperty); }
set { SetValue(FillProperty, value); }
}

#endregion

#region Stroke

/// <summary>
/// Stroke Dependency Property
/// </summary>
public static readonly DependencyProperty StrokeProperty =
DependencyProperty.Register("Stroke", typeof(Brush), typeof(SplineBorder),
new FrameworkPropertyMetadata(Brushes.Black, FrameworkPropertyMetadataOptions.AffectsRender));

/// <summary>
/// Gets or sets the Stroke property. This dependency property
/// indicates the stroke brush.
/// </summary>
public Brush Stroke
{
get { return (Brush)GetValue(StrokeProperty); }
set { SetValue(StrokeProperty, value); }
}

#endregion

#region BottomBorderMargin

/// <summary>
/// BottomBorderMargin Dependency Property
/// </summary>
public static readonly DependencyProperty BottomBorderMarginProperty =
DependencyProperty.Register("BottomBorderMargin", typeof(double), typeof(SplineBorder),
new FrameworkPropertyMetadata((double)0.0, FrameworkPropertyMetadataOptions.AffectsRender));

/// <summary>
/// Gets or sets the BottomBorderMargin property. This dependency property
/// indicates the adjustment for the bottom margin.
/// </summary>
public double BottomBorderMargin
{
get { return (double)GetValue(BottomBorderMarginProperty); }
set { SetValue(BottomBorderMarginProperty, value); }
}

#endregion



protected override void OnRender(DrawingContext drawingContext)
{
var pgFill = new PathGeometry();
var pfFill = new PathFigure() { IsFilled = true, IsClosed = true };
pfFill.StartPoint = new Point(ActualWidth, 0.0);

var q1Fill = new QuadraticBezierSegment() { Point1 = new Point(ActualWidth * 2 / 3, 0.0), Point2 = new Point(ActualWidth / 2.0, ActualHeight / 2.0), IsStroked = false };
pfFill.Segments.Add(q1Fill);
var q2Fill = new QuadraticBezierSegment() { Point1 = new Point(ActualWidth / 3, ActualHeight ), Point2 = new Point(0, ActualHeight ), IsStroked = false };
pfFill.Segments.Add(q2Fill);

pfFill.Segments.Add(new LineSegment() { Point = new Point(ActualWidth, ActualHeight ), IsStroked = false });

pgFill.Figures.Add(pfFill);

drawingContext.DrawGeometry(Fill, null, pgFill);

var pgBorder = new PathGeometry();
var pfBorder = new PathFigure() { IsFilled = false, IsClosed = false };
pfBorder.StartPoint = new Point(ActualWidth, Thickness / 2);

var q1Border = new QuadraticBezierSegment() { Point1 = new Point(ActualWidth * 2 / 3, 0.0), Point2 = new Point(ActualWidth / 2.0, ActualHeight / 2.0) };
pfBorder.Segments.Add(q1Border);
var q2Border = new QuadraticBezierSegment() { Point1 = new Point(ActualWidth / 3, ActualHeight), Point2 = new Point(0.0, ActualHeight - BottomBorderMargin) };
pfBorder.Segments.Add(q2Border);

pgBorder.Figures.Add(pfBorder);

drawingContext.DrawGeometry(null, new Pen(Stroke, Thickness), pgBorder);
drawingContext.DrawGeometry( null, new Pen( Stroke, Thickness ), pgBorder );

base.OnRender(drawingContext);
}
base.OnRender( drawingContext );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Toolkit for WPF
Copyright (C) 2007-2020 Xceed Software Inc.
Copyright (C) 2007-2022 Xceed Software Inc.
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
Expand Down Expand Up @@ -31,7 +31,7 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at

[assembly: AssemblyCompany( "Xceed Software Inc." )]
[assembly: AssemblyProduct( "Xceed Toolkit for WPF - AvalonDock" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2021" )]
[assembly: AssemblyCopyright( "Copyright (C) Xceed Software Inc. 2007-2022" )]



Expand Down Expand Up @@ -65,7 +65,11 @@ COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at

#pragma warning disable 1699
[assembly: AssemblyDelaySign( false )]
#if NETCORE || NET5
[assembly: AssemblyKeyFile( @"..\..\..\..\sn.snk" )]
#else
[assembly: AssemblyKeyFile( @"..\..\sn.snk" )]
#endif
[assembly: AssemblyKeyName( "" )]
#pragma warning restore 1699

Loading

0 comments on commit b5ce95e

Please sign in to comment.