Skip to content

Commit

Permalink
chore(markup)!: update c#markup
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Oct 12, 2023
1 parent 859d230 commit 6f4f462
Show file tree
Hide file tree
Showing 21 changed files with 2,390 additions and 1,970 deletions.
592 changes: 272 additions & 320 deletions src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs

Large diffs are not rendered by default.

115 changes: 115 additions & 0 deletions src/library/Uno.Themes.WinUI.Markup/Theme/CalendarDatePicker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
using System;
using Windows.UI;
using Microsoft.UI.Text;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
using Uno.Extensions.Markup;
using Uno.Extensions.Markup.Internals;

namespace Uno.Themes.Markup
{
public static partial class Theme
{
public static partial class CalendarDatePicker
{
public static partial class Resources
{
public static readonly BackgroundVSG Background = new();
public partial class BackgroundVSG
{
[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBackground")]
public ThemeResourceKey<Brush> Default = new("CalendarDatePickerBackground");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBackgroundPointerOver")]
public ThemeResourceKey<Brush> PointerOver = new("CalendarDatePickerBackgroundPointerOver");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBackgroundPressed")]
public ThemeResourceKey<Brush> Pressed = new("CalendarDatePickerBackgroundPressed");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBackgroundDisabled")]
public ThemeResourceKey<Brush> Disabled = new("CalendarDatePickerBackgroundDisabled");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBackgroundFocused")]
public ThemeResourceKey<Brush> Focused = new("CalendarDatePickerBackgroundFocused");

public static implicit operator ThemeResourceKey<Brush>(BackgroundVSG self) => self.Default;
}

public static readonly BorderBrushVSG BorderBrush = new();
public partial class BorderBrushVSG
{
[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBorderBrush")]
public ThemeResourceKey<Brush> Default = new("CalendarDatePickerBorderBrush");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBorderBrushPointerOver")]
public ThemeResourceKey<Brush> PointerOver = new("CalendarDatePickerBorderBrushPointerOver");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBorderBrushPressed")]
public ThemeResourceKey<Brush> Pressed = new("CalendarDatePickerBorderBrushPressed");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBorderBrushDisabled")]
public ThemeResourceKey<Brush> Disabled = new("CalendarDatePickerBorderBrushDisabled");

public static implicit operator ThemeResourceKey<Brush>(BorderBrushVSG self) => self.Default;
}

public static partial class Header
{
[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerHeaderForeground")]
public static ThemeResourceKey<Brush> Foreground => new("CalendarDatePickerHeaderForeground");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerHeaderForegroundDisabled")]
public static ThemeResourceKey<Brush> ForegroundDisabled => new("CalendarDatePickerHeaderForegroundDisabled");
}

public static readonly TextForegroundVSG TextForeground = new();
public partial class TextForegroundVSG
{
[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerTextForeground")]
public ThemeResourceKey<Brush> Default = new("CalendarDatePickerTextForeground");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerTextForegroundDisabled")]
public ThemeResourceKey<Brush> Disabled = new("CalendarDatePickerTextForegroundDisabled");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerTextForegroundSelected")]
public ThemeResourceKey<Brush> Selected = new("CalendarDatePickerTextForegroundSelected");

public static implicit operator ThemeResourceKey<Brush>(TextForegroundVSG self) => self.Default;
}

[ResourceKeyDefinition(typeof(CornerRadius), "CalendarDatePickerBackgroundCornerRadius")]
public static ThemeResourceKey<CornerRadius> BackgroundCornerRadius => new("CalendarDatePickerBackgroundCornerRadius");

[ResourceKeyDefinition(typeof(double), "CalendarDatePickerBackgroundMinHeight")]
public static ThemeResourceKey<double> BackgroundMinHeight => new("CalendarDatePickerBackgroundMinHeight");

[ResourceKeyDefinition(typeof(Thickness), "CalendarDatePickerBorderThemeThickness")]
public static ThemeResourceKey<Thickness> BorderThemeThickness => new("CalendarDatePickerBorderThemeThickness");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerBottomBorderBrush")]
public static ThemeResourceKey<Brush> BottomBorderBrush => new("CalendarDatePickerBottomBorderBrush");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerCalendarGlyphForegroundDisabled")]
public static ThemeResourceKey<Brush> CalendarGlyphForegroundDisabled => new("CalendarDatePickerCalendarGlyphForegroundDisabled");

[ResourceKeyDefinition(typeof(Thickness), "CalendarDatePickerContentMargin")]
public static ThemeResourceKey<Thickness> ContentMargin => new("CalendarDatePickerContentMargin");

[ResourceKeyDefinition(typeof(CornerRadius), "CalendarDatePickerCornerRadius")]
public static ThemeResourceKey<CornerRadius> CornerRadius => new("CalendarDatePickerCornerRadius");

[ResourceKeyDefinition(typeof(Brush), "CalendarDatePickerForeground")]
public static ThemeResourceKey<Brush> Foreground => new("CalendarDatePickerForeground");

[ResourceKeyDefinition(typeof(double), "CalendarDatePickerHeight")]
public static ThemeResourceKey<double> Height => new("CalendarDatePickerHeight");
}

public static partial class Styles
{
[ResourceKeyDefinition(typeof(Style), "MaterialCalendarDatePickerStyle", TargetType = typeof(Style))]
public static StaticResourceKey<Style> Default => new("MaterialCalendarDatePickerStyle");
}
}
}
}
34 changes: 34 additions & 0 deletions src/library/Uno.Themes.WinUI.Markup/Theme/CalendarView.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using Windows.UI;
using Microsoft.UI.Text;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
using Uno.Extensions.Markup;
using Uno.Extensions.Markup.Internals;

namespace Uno.Themes.Markup
{
public static partial class Theme
{
public static partial class CalendarView
{
public static partial class Resources
{
public static partial class Calendar
{
[ResourceKeyDefinition(typeof(Brush), "MaterialCalendarBlackoutForeground")]
public static ThemeResourceKey<Brush> BlackoutForeground => new("MaterialCalendarBlackoutForeground");

[ResourceKeyDefinition(typeof(Brush), "MaterialCalendarTodayForeground")]
public static StaticResourceKey<Brush> TodayForeground => new("MaterialCalendarTodayForeground");
}
}

public static partial class Styles
{
[ResourceKeyDefinition(typeof(Style), "MaterialCalendarViewStyle", TargetType = typeof(Style))]
public static StaticResourceKey<Style> Default => new("MaterialCalendarViewStyle");
}
}
}
}
Loading

0 comments on commit 6f4f462

Please sign in to comment.