Skip to content

Commit daee9eb

Browse files
committed
Fix chart, Calendar and improve TimePicker
1 parent 803a85d commit daee9eb

40 files changed

+3311
-733
lines changed

BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/BionicCode.Controls.Net.Core.Wpf.csproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@
1010
<DocumentationFile>D:\-Programming-\C#\GitOpenSourceRepository\BionicCode.Net\BionicCode.Net\BionicCode.Controls.Net.Core.Wpf\BionicCode.Controls.Net.Core.Wpf.xml</DocumentationFile>
1111
</PropertyGroup>
1212

13+
<ItemGroup>
14+
<ProjectReference Include="..\BionicCode.Utilities.Net.Core.Wpf\BionicCode.Utilities.Net.Core.Wpf.csproj" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<Compile Update="Resources\Resources.Designer.cs">
19+
<DesignTime>True</DesignTime>
20+
<AutoGen>True</AutoGen>
21+
<DependentUpon>Resources.resx</DependentUpon>
22+
</Compile>
23+
</ItemGroup>
24+
25+
<ItemGroup>
26+
<EmbeddedResource Update="Resources\Resources.resx">
27+
<Generator>ResXFileCodeGenerator</Generator>
28+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
29+
</EmbeddedResource>
30+
</ItemGroup>
31+
1332
<ItemGroup>
1433
<Page Update="Themes\Generic.xaml">
1534
<SubType>Designer</SubType>

BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/BionicCode.Controls.Net.Core.Wpf.xml

Lines changed: 85 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Control/ClosableTabControl.cs renamed to BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Controls/ClosableTabControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Windows.Controls;
44
using System.Windows.Input;
55

6-
namespace BionicCode.Controls.Net.Core.Wpf.Control
6+
namespace BionicCode.Controls.Net.Core.Wpf.Controls
77
{
88
/// <summary>
99
/// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.

BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Control/HighlightRichTextBox.cs renamed to BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Controls/HighlightRichTextBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#endregion
1414

15-
namespace BionicCode.Controls.Net.Core.Wpf.Control
15+
namespace BionicCode.Controls.Net.Core.Wpf.Controls
1616
{
1717
/// <summary>
1818
/// Implement this interface to apply a custom highlight style for more complex scenarios e.g., code editors.

BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Control/NormalizingNumericTextBox.cs renamed to BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Controls/NormalizingNumericTextBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.Windows.Data;
99
using System.Windows.Input;
1010

11-
namespace BionicCode.Controls.Net.Core.Wpf.Control
11+
namespace BionicCode.Controls.Net.Core.Wpf.Controls
1212
{
1313
/// <summary>
1414
/// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file.

BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Control/ScrollModeListBox.cs renamed to BionicCode.Net/BionicCode.Controls.Net.Core.Wpf/Controls/ScrollModeListBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Windows.Controls;
44
using System.Windows.Media;
55

6-
namespace BionicCode.Controls.Net.Core.Wpf.Control
6+
namespace BionicCode.Controls.Net.Core.Wpf.Controls
77
{
88
public enum ItemsUpdatingScrollMode
99
{
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System;
2+
using System.Globalization;
3+
using System.Windows.Data;
4+
5+
namespace BionicCode.Controls.Net.Core.Wpf.Converters
6+
{
7+
[ValueConversion(typeof(bool), typeof(string))]
8+
class SwitchIsCheckedToStringConverter : IValueConverter
9+
{
10+
#region Implementation of IValueConverter
11+
12+
/// <summary>
13+
/// Konvertiert einen Wert.
14+
/// </summary>
15+
/// <returns>
16+
/// Ein konvertierter Wert.Wenn die Methode null zurückgibt, wird der gültige NULL-Wert verwendet.
17+
/// </returns>
18+
/// <param name="value">Der von der Bindungsquelle erzeugte Wert.</param><param name="targetType">Der Typ der Bindungsziel-Eigenschaft.</param><param name="parameter">Der zu verwendende Konverterparameter.</param><param name="culture">Die im Konverter zu verwendende Kultur.</param>
19+
public object Convert(object value,
20+
Type targetType,
21+
object parameter,
22+
CultureInfo culture)
23+
{
24+
if (!(value is bool))
25+
{
26+
throw new ArgumentException("Wrong conversion type. Only conversion from bool to srting supported.", nameof(value));
27+
}
28+
29+
return (bool) value
30+
? Resources.Resources.SwitchStateToggled
31+
: Resources.Resources.SwitchStateUntoggled;
32+
}
33+
34+
/// <summary>
35+
/// Konvertiert einen Wert.
36+
/// </summary>
37+
/// <returns>
38+
/// Ein konvertierter Wert.Wenn die Methode null zurückgibt, wird der gültige NULL-Wert verwendet.
39+
/// </returns>
40+
/// <param name="value">Der Wert, der vom Bindungsziel erzeugt wird.</param><param name="targetType">Der Typ, in den konvertiert werden soll.</param><param name="parameter">Der zu verwendende Konverterparameter.</param><param name="culture">Die im Konverter zu verwendende Kultur.</param>
41+
public object ConvertBack(object value,
42+
Type targetType,
43+
object parameter,
44+
CultureInfo culture)
45+
{
46+
throw new NotImplementedException();
47+
}
48+
49+
#endregion
50+
}
51+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Globalization;
3+
using System.Windows.Data;
4+
5+
namespace BionicCode.Controls.Net.Core.Wpf.Converters
6+
{
7+
class SwitchWidthToTotalWidthConverter : IMultiValueConverter
8+
{
9+
#region Implementation of IMultiValueConverter
10+
11+
/// <summary>
12+
/// Konvertiert einen Wert.
13+
/// </summary>
14+
/// <returns>
15+
/// Ein konvertierter Wert.Wenn die Methode null zurückgibt, wird der gültige NULL-Wert verwendet.
16+
/// </returns>
17+
/// <param name="widthParameters">Der von der Bindungsquelle erzeugte Wert.</param><param name="targetType">Der Typ der Bindungsziel-Eigenschaft.</param><param name="labelWidthParameter">Der zu verwendende Konverterparameter.</param><param name="culture">Die im Konverter zu verwendende Kultur.</param>
18+
public object Convert(object[] widthParameters,
19+
Type targetType,
20+
object labelWidthParameter,
21+
CultureInfo culture)
22+
{
23+
double desiredSwitchWidth = (double) widthParameters[0];
24+
double switchLabelWidth = (double) widthParameters[1];
25+
var totalControlWidth = desiredSwitchWidth + switchLabelWidth;
26+
return totalControlWidth > -1 ? totalControlWidth : 0;
27+
}
28+
29+
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
30+
{
31+
throw new NotImplementedException();
32+
}
33+
34+
#endregion
35+
}
36+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#region Info
2+
3+
// 2020/12/30 18:56
4+
// BionicCode.Controls.Net.Core.Wpf
5+
6+
#endregion
7+
8+
namespace BionicCode.Controls.Net.Core.Wpf
9+
{
10+
public enum Meridiem
11+
{
12+
None = 0, AM, PM
13+
}
14+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3+
<Color x:Key="TextLinkColor">DodgerBlue</Color>
4+
<Color x:Key="TextBrushColor">#FF474646</Color>
5+
<Color x:Key="TextBrushLightColor">WhiteSmoke</Color>
6+
<Color x:Key="HighLightColor">WhiteSmoke</Color>
7+
<Color x:Key="ControlBackgroundColor">DimGray</Color>
8+
<Color x:Key="ControlColor">DarkGray</Color>
9+
<Color x:Key="GlyphColor">#FF444444</Color>
10+
<Color x:Key="DisabledForegroundColor">#FF888888</Color>
11+
<Color x:Key="ControlPressedColor">LightBlue</Color>
12+
<SolidColorBrush x:Key="Item.SelectedActive.Background" Color="Black"/>
13+
<SolidColorBrush x:Key="ControlBackgroundBrush" Color="{StaticResource ControlBackgroundColor}"/>
14+
<SolidColorBrush x:Key="ControlBrush" Color="{StaticResource ControlColor}"/>
15+
<SolidColorBrush x:Key="TextLinkBrush"
16+
Color="{StaticResource TextLinkColor}"
17+
Opacity="1" />
18+
<SolidColorBrush x:Key="TextBrush"
19+
Color="{StaticResource TextBrushColor}"
20+
Opacity="1" />
21+
<SolidColorBrush x:Key="TextLightBrush"
22+
Color="{StaticResource TextBrushLightColor}"
23+
Opacity="1" />
24+
<SolidColorBrush x:Key="HighLightBrush"
25+
Color="{StaticResource HighLightColor}"
26+
Opacity="1" />
27+
<SolidColorBrush x:Key="ApplicationWhiteBrush"
28+
Color="White"
29+
Opacity="1" />
30+
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Pink"/>
31+
</ResourceDictionary>

0 commit comments

Comments
 (0)