Skip to content

Commit a1789cd

Browse files
committed
update codegen
1 parent b3dc08b commit a1789cd

File tree

5 files changed

+82
-60
lines changed

5 files changed

+82
-60
lines changed

package/src/Enums.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ export enum Stretch {
99
Uniform = 2,
1010
UniformToFill = 3,
1111
}
12+
export enum Orientation {
13+
Vertical = 0,
14+
Horizontal = 1,
15+
}
1216
export enum TextReadingOrder {
1317
Default = 0,
1418
UseFlowDirection = 0,
1519
DetectFromContent = 1,
1620
}
17-
export enum Orientation {
18-
Vertical = 0,
19-
Horizontal = 1,
20-
}
2121
export enum ManipulationModes {
2222
None = 0,
2323
TranslateX = 1,

package/src/Props.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ export interface NativeColorPickerProps extends NativeControlProps {
746746
colorSpectrumShape?: Enums.WinUIEnums.ColorSpectrumShape;
747747
colorSpectrumComponents?: Enums.WinUIEnums.ColorSpectrumComponents;
748748
color?: Color | number;
749+
orientation?: Enums.Orientation;
749750
onColorChanged?: (event: NativeSyntheticEvent<TypedEvent<NativeWinUI.NativeColorChangedEventArgs>>) => void;
750751
}
751752
}
@@ -776,6 +777,12 @@ export interface NativeImageIconProps extends NativeIconElementProps {
776777
}
777778
}
778779
export namespace NativeWinUI {
780+
export interface NativeInfoBadgeProps extends NativeControlProps {
781+
type: 'Microsoft.UI.Xaml.Controls.InfoBadge';
782+
value?: number;
783+
}
784+
}
785+
export namespace NativeWinUI {
779786
export interface NativeInfoBarProps extends NativeControlProps {
780787
type: 'Microsoft.UI.Xaml.Controls.InfoBar';
781788
title?: string;
@@ -1216,6 +1223,7 @@ export interface NativeDependencyObjectProps extends ViewProps {
12161223
'Microsoft.UI.Xaml.Controls.DropDownButton' |
12171224
'Microsoft.UI.Xaml.Controls.Expander' |
12181225
'Microsoft.UI.Xaml.Controls.ImageIcon' |
1226+
'Microsoft.UI.Xaml.Controls.InfoBadge' |
12191227
'Microsoft.UI.Xaml.Controls.InfoBar' |
12201228
'Microsoft.UI.Xaml.Controls.ItemsRepeater' |
12211229
'Microsoft.UI.Xaml.Controls.ItemsRepeaterScrollHost' |
@@ -1474,6 +1482,7 @@ export interface NativeUIElementProps extends NativeDependencyObjectProps {
14741482
'Microsoft.UI.Xaml.Controls.DropDownButton' |
14751483
'Microsoft.UI.Xaml.Controls.Expander' |
14761484
'Microsoft.UI.Xaml.Controls.ImageIcon' |
1485+
'Microsoft.UI.Xaml.Controls.InfoBadge' |
14771486
'Microsoft.UI.Xaml.Controls.InfoBar' |
14781487
'Microsoft.UI.Xaml.Controls.ItemsRepeater' |
14791488
'Microsoft.UI.Xaml.Controls.ItemsRepeaterScrollHost' |
@@ -1775,6 +1784,7 @@ export interface NativeFrameworkElementProps extends NativeUIElementProps {
17751784
'Microsoft.UI.Xaml.Controls.DropDownButton' |
17761785
'Microsoft.UI.Xaml.Controls.Expander' |
17771786
'Microsoft.UI.Xaml.Controls.ImageIcon' |
1787+
'Microsoft.UI.Xaml.Controls.InfoBadge' |
17781788
'Microsoft.UI.Xaml.Controls.InfoBar' |
17791789
'Microsoft.UI.Xaml.Controls.ItemsRepeater' |
17801790
'Microsoft.UI.Xaml.Controls.ItemsRepeaterScrollHost' |
@@ -2028,6 +2038,7 @@ export interface NativeControlProps extends NativeFrameworkElementProps {
20282038
'Microsoft.UI.Xaml.Controls.ColorPicker' |
20292039
'Microsoft.UI.Xaml.Controls.DropDownButton' |
20302040
'Microsoft.UI.Xaml.Controls.Expander' |
2041+
'Microsoft.UI.Xaml.Controls.InfoBadge' |
20312042
'Microsoft.UI.Xaml.Controls.InfoBar' |
20322043
'Microsoft.UI.Xaml.Controls.MenuBar' |
20332044
'Microsoft.UI.Xaml.Controls.MenuBarItem' |
@@ -4276,6 +4287,7 @@ export type XamlControlProps = NativeWinUI.NativeAnimatedIconProps
42764287
| NativeWinUI.NativeDropDownButtonProps
42774288
| NativeWinUI.NativeExpanderProps
42784289
| NativeWinUI.NativeImageIconProps
4290+
| NativeWinUI.NativeInfoBadgeProps
42794291
| NativeWinUI.NativeInfoBarProps
42804292
| NativeWinUI.NativeItemsRepeaterProps
42814293
| NativeWinUI.NativeItemsRepeaterScrollHostProps

package/src/Types.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,13 @@ export type ImageIconRef = React.Component<NativeWinUI.NativeImageIconProps> & R
399399
const _ImageIcon : (ForwardRefExoticComponent<React.PropsWithChildren<ImageIconProps> & RefAttributes<ImageIconRef>>) = React.forwardRef((props: React.PropsWithChildren<ImageIconProps>, ref: React.ForwardedRef<ImageIconRef>) => <NativeXamlControl {...props} type='Microsoft.UI.Xaml.Controls.ImageIcon' ref={ref} />);
400400
export const ImageIcon = (_ImageIcon as (ForwardRefExoticComponent<React.PropsWithChildren<ImageIconProps> & RefAttributes<ImageIconRef>>));
401401

402+
}
403+
export namespace WinUI {
404+
export type InfoBadgeProps = Omit<NativeWinUI.NativeInfoBadgeProps, 'type'>;
405+
export type InfoBadgeRef = React.Component<NativeWinUI.NativeInfoBadgeProps> & Readonly<NativeMethods>;
406+
const _InfoBadge : (ForwardRefExoticComponent<React.PropsWithChildren<InfoBadgeProps> & RefAttributes<InfoBadgeRef>>) = React.forwardRef((props: React.PropsWithChildren<InfoBadgeProps>, ref: React.ForwardedRef<InfoBadgeRef>) => <NativeXamlControl {...props} type='Microsoft.UI.Xaml.Controls.InfoBadge' ref={ref} />);
407+
export const InfoBadge = (_InfoBadge as (ForwardRefExoticComponent<React.PropsWithChildren<InfoBadgeProps> & RefAttributes<InfoBadgeRef>>));
408+
402409
}
403410
export namespace WinUI {
404411
export type InfoBarProps = Omit<NativeWinUI.NativeInfoBarProps, 'type'>;

package/windows/ReactNativeXaml/Codegen/TypeCreator.g.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ winrt::Windows::Foundation::IInspectable XamlMetadata::Create(const std::string_
4545
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.DropDownButton"): { return winrt::Microsoft::UI::Xaml::Controls::DropDownButton(); }
4646
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.Expander"): { return winrt::Microsoft::UI::Xaml::Controls::Expander(); }
4747
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ImageIcon"): { return winrt::Microsoft::UI::Xaml::Controls::ImageIcon(); }
48+
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.InfoBadge"): { return winrt::Microsoft::UI::Xaml::Controls::InfoBadge(); }
4849
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.InfoBar"): { return winrt::Microsoft::UI::Xaml::Controls::InfoBar(); }
4950
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.ItemsRepeater"): { return winrt::Microsoft::UI::Xaml::Controls::ItemsRepeater(); }
5051
case COMPILE_TIME_CRC32_STR("Microsoft.UI.Xaml.Controls.MenuBar"): { return winrt::Microsoft::UI::Xaml::Controls::MenuBar(); }

0 commit comments

Comments
 (0)