mirror of
https://github.com/microsoft/microsoft-ui-xaml.git
synced 2026-10-29 00:46:30 +08:00
ResizeGripper: review fixes - stale-drag revert, resize cursor, vertical affordance
Addresses the nine findings from the framework review of PR #11640, plus one the review missed and running the sample found (F-13). F-1 (High) A drag started while another was live reverted the column to a width from a PREVIOUS gesture. TableView's DragStarted reset didWrite/didDelta only after its "one resize at a time" guard, and that guard ends the new gesture with EndDrag(canceled) - so DragCompleted saw the previous drag's didWrite and restored the previous drag's startWidth, silently undoing a committed resize. Reachable with a pointer drag held on one gripper and an arrow key on another header, or with a second touch contact. The reset now happens first. F-2 DragOrientation="Vertical" is advertised in the IDL but the separator was hard-wired to 0,0,2,0, so a vertical gripper drew its line along the axis it travels. The two concerns are now on two visual-state groups - CommonStates owns whether the separator shows (Opacity), the new OrientationStates owns which edge it is drawn on (BorderThickness) - because one group would have both states writing the same target. Adds ResizeGripperSeparatorThicknessVertical and UpdateOrientationVisualState, driven from OnApplyTemplate and the DragOrientation property change. The separator also moved into its own non-hit-testable child so showing and hiding it cannot interact with pointer input. F-4 Every gripper published a named but pattern-less Thumb in the UIA Content view, doubling the header band's node count with nodes that are not tab stops and expose nothing to invoke. AccessibilityView="Raw" in the default style, matching ScrollBar's HorizontalThumb/VerticalThumb and SortIndicator's glyph. OwnerName and the composed peer name are kept - they still identify the element in the raw view and for a host that opts it back into Content. F-5 TableViewResizeGripperWidth existed only in the theme-resources page, which is not emitted for the Tabular binary, so the key never resolved and the C++ constant was the real default. Mirrored into TableView.xaml's root dictionary alongside the two metrics already mirrored there for the same reason. F-7 A host handler that throws out of DragStarted/DragDelta left IsDragging stuck true on the keyboard path: unlike a pointer drag there is no ManipulationCompleted to follow and clean up, so every later BeginDrag early-returned and resize died for the life of the element. Not a wil::scope_exit - EndDrag raises DragCompleted, and running that from a noexcept guard during unwind would terminate on a handler that throws in turn. F-8 Added the template contract block to the IDL - required parts, the named state target, both visual-state groups and the lightweight-styling keys - following the convention TableView.idl already sets. F-9 Regenerated XamlMetadataProviderGenerated.h. It is produced by the T4 in Microsoft.UI.Xaml.Common.targets from the stripped winmd; this is that output, not a hand-written entry. F-10 StringUtil::FormatString ignored the FormatMessage result and constructed an hstring from a null buffer on failure, which the automation peer's comment assumed could not happen - inside a UIA callback, where nothing may escape. The helper now returns an empty string, making the peer's fallback true. F-12 The width announcement's translator comment said keyboard-only; it is raised from DragCompleted for pointer drags too. F-13 The resize cursor never appeared - hovering a divider lit the separator but left the pointer an arrow, so nothing about the element said it was draggable. UpdateResizeCursor ran only from OnApplyTemplate and the DragOrientation change; a ProtectedCursor assigned before the element is live does not stick (microsoft-ui-xaml#7062). The function's own comment already said the shape "gets re-resolved while the pointer is already over us" - that re-resolution was simply never wired up. Now called from OnPointerEntered, where it no-ops if the shape is already in effect. Built: Microsoft.UI.Xaml.Controls.Tabular.vcxproj, amd64chk, clean. Verified by running the TableView sample (amd64chk, unpackaged self-contained): - F-4: UIA Content view has 0 gripper nodes; the Raw view still has all 8, with per-column composed names. - F-13: sweeping the header band, the west-east cursor appears over the column dividers. The same sweep on a build without this change produced 1603 arrow samples and not one resize cursor - so the fix is what makes the difference. Still not proven by either, and deliberately left open: F-1 needs the concurrent-drag trigger performed; the vertical affordance has no consumer that sets DragOrientation="Vertical"; the 8 DIP touch target is unchanged pending design sign-off.
This commit is contained in:
1 parent
15e4d335e1
commit
7ed5ccd29e
9 files changed
+234
-13
No files matched your search
@@ -61,6 +61,7 @@ void ResizeGripper::OnApplyTemplate()
|
||||
__super::OnApplyTemplate();
|
||||
m_templateApplied = true;
|
||||
UpdateResizeCursor();
|
||||
UpdateOrientationVisualState();
|
||||
UpdateVisualState();
|
||||
}
|
||||
|
||||
@@ -68,6 +69,8 @@ void ResizeGripper::OnPointerEntered(winrt::PointerRoutedEventArgs const& args)
|
||||
{
|
||||
__super::OnPointerEntered(args);
|
||||
m_isPointerOver = true;
|
||||
// A cursor assigned before the element is live does not stick (microsoft-ui-xaml#7062).
|
||||
UpdateResizeCursor();
|
||||
UpdateVisualState();
|
||||
}
|
||||
|
||||
@@ -90,6 +93,13 @@ void ResizeGripper::UpdateVisualState()
|
||||
winrt::VisualStateManager::GoToState(*this, state, true /* useTransitions */);
|
||||
}
|
||||
|
||||
void ResizeGripper::UpdateOrientationVisualState()
|
||||
{
|
||||
winrt::VisualStateManager::GoToState(*this,
|
||||
(DragOrientation() == winrt::Orientation::Vertical) ? L"Vertical" : L"Horizontal",
|
||||
true /* useTransitions */);
|
||||
}
|
||||
|
||||
// Owned by the primitive so every host gets the right shape, keyed off the direction of travel.
|
||||
// Two guards, both of which cause a visibly flickering cursor when missed:
|
||||
// - nothing before OnApplyTemplate. Assigning ProtectedCursor that early does not stick reliably
|
||||
@@ -278,6 +288,7 @@ void ResizeGripper::OnPropertyChanged(const winrt::DependencyPropertyChangedEven
|
||||
if (args.Property() == s_DragOrientationProperty)
|
||||
{
|
||||
UpdateResizeCursor();
|
||||
UpdateOrientationVisualState();
|
||||
UpdateManipulationMode();
|
||||
}
|
||||
}
|
||||
@@ -335,8 +346,18 @@ bool ResizeGripper::TryKeyboardStep(winrt::VirtualKey key)
|
||||
? EffectiveKeyboardIncrement() * c_largeIncrementMultiplier
|
||||
: EffectiveKeyboardIncrement();
|
||||
|
||||
BeginDrag();
|
||||
TryDrag(direction * step);
|
||||
// No ManipulationCompleted follows a keyboard step, so a throw would strand IsDragging.
|
||||
try
|
||||
{
|
||||
BeginDrag();
|
||||
TryDrag(direction * step);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
EndDrag(true /* canceled */);
|
||||
throw;
|
||||
}
|
||||
|
||||
EndDrag(false /* canceled */);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ private:
|
||||
void UpdateResizeCursor();
|
||||
void UpdateManipulationMode();
|
||||
void UpdateVisualState();
|
||||
void UpdateOrientationVisualState();
|
||||
double EffectiveKeyboardIncrement();
|
||||
void OnIsEnabledChanged(const winrt::IInspectable& sender, const winrt::DependencyPropertyChangedEventArgs& args);
|
||||
void OnUnloaded(const winrt::IInspectable& sender, const winrt::RoutedEventArgs& args);
|
||||
|
||||
@@ -26,6 +26,14 @@ runtimeclass ResizeGripperDragCompletedEventArgs
|
||||
|
||||
// Policy-free drag handle. Owns no layout, no value and no bounds: it reports how far the user has
|
||||
// dragged, and the host decides what that means and clamps it.
|
||||
//
|
||||
// Template contract (MIDL3 does not surface [TemplatePart], so this block is it):
|
||||
// Required parts: none. No GetTemplateChild call; a template may omit everything.
|
||||
// State targets: "Separator" - the visual-state setters target it by name.
|
||||
// Visual state groups: CommonStates - Normal, PointerOver, Pressed, Disabled.
|
||||
// OrientationStates - Horizontal, Vertical; follows DragOrientation.
|
||||
// Styling keys: ResizeGripperSeparatorBrush, ResizeGripperSeparatorThickness,
|
||||
// ResizeGripperSeparatorThicknessVertical.
|
||||
[MUX_INTERNAL]
|
||||
[webhosthidden]
|
||||
[MUX_PROPERTY_CHANGED_CALLBACK(TRUE)]
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.ThemeDictionaries>
|
||||
|
||||
<!-- Drawn on the logical-end edge while pointing at or dragging the gripper. -->
|
||||
<Thickness x:Key="ResizeGripperSeparatorThickness">0,0,2,0</Thickness>
|
||||
<Thickness x:Key="ResizeGripperSeparatorThicknessVertical">0,0,0,2</Thickness>
|
||||
|
||||
<Style TargetType="privatecontrols:ResizeGripper">
|
||||
<!-- A pointer affordance by default: a host that wants it focusable sets IsTabStop="True"
|
||||
@@ -31,6 +31,7 @@
|
||||
cell, where the column commands live. -->
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
||||
<Setter Property="AutomationProperties.AccessibilityView" Value="Raw" />
|
||||
<!-- A Border with a null Background does not hit-test; being a pointer target is the point. -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{ThemeResource ResizeGripperSeparatorBrush}" />
|
||||
@@ -43,27 +44,44 @@
|
||||
ResizeGripperSeparatorThickness. -->
|
||||
<Border x:Name="LayoutRoot"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch">
|
||||
<Border x:Name="Separator"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Opacity="0"
|
||||
IsHitTestVisible="False"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" />
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<!-- Separate groups: sharing one would make hover and orientation fight over BorderThickness. -->
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="LayoutRoot.BorderThickness" Value="{ThemeResource ResizeGripperSeparatorThickness}" />
|
||||
<Setter Target="Separator.Opacity" Value="1" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<!-- Same weight as PointerOver: the pointer is still over the
|
||||
gripper during a drag, and a change mid-gesture reads as a glitch. -->
|
||||
<VisualState x:Name="Pressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="LayoutRoot.BorderThickness" Value="{ThemeResource ResizeGripperSeparatorThickness}" />
|
||||
<Setter Target="Separator.Opacity" Value="1" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Disabled" />
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="OrientationStates">
|
||||
<VisualState x:Name="Horizontal">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Separator.BorderThickness" Value="{ThemeResource ResizeGripperSeparatorThickness}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Vertical">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="Separator.BorderThickness" Value="{ThemeResource ResizeGripperSeparatorThicknessVertical}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -12,7 +12,7 @@ winrt::hstring StringUtil::FormatString(std::wstring_view formatString, ...)
|
||||
LPVOID formattedString = nullptr;
|
||||
|
||||
// Format the string
|
||||
FormatMessage(
|
||||
const DWORD formattedLength = FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_STRING,
|
||||
formatString.data(),
|
||||
@@ -24,6 +24,12 @@ winrt::hstring StringUtil::FormatString(std::wstring_view formatString, ...)
|
||||
|
||||
va_end(pArgs);
|
||||
|
||||
if (formattedLength == 0 || formattedString == nullptr)
|
||||
{
|
||||
LocalFree(formattedString);
|
||||
return {};
|
||||
}
|
||||
|
||||
winrt::hstring result((LPTSTR)formattedString);
|
||||
LocalFree(formattedString);
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<!-- Automation peer strings -->
|
||||
<data name="TableViewColumnWidthChanged" xml:space="preserve">
|
||||
<value>Column %1!s! width: %2!s! pixels.</value>
|
||||
<comment>Assistive-technology announcement raised when a TableView column is resized with the keyboard while its header has focus. %1!s! is the column header text; %2!s! is the whole-pixel width.</comment>
|
||||
<comment>Assistive-technology announcement raised when a TableView column is resized, by pointer or by keyboard, while its header has focus. %1!s! is the column header text; %2!s! is the whole-pixel width.</comment>
|
||||
</data>
|
||||
<!-- Sort direction names (used in SaveLayoutToJson serialization — not localized at runtime but
|
||||
kept here for documentation; code uses invariant English for round-trip fidelity) -->
|
||||
|
||||
@@ -1540,6 +1540,10 @@ void TableView::AppendResizeGripperVisual(
|
||||
{
|
||||
auto const strongThis = weakThis.get();
|
||||
|
||||
// Before the guard below: a stale didWrite would revert to the previous drag's start width.
|
||||
state->didWrite = false;
|
||||
state->didDelta = false;
|
||||
|
||||
// One resize at a time. Manipulation arbitrates per element, so a second contact on a
|
||||
// DIFFERENT gripper would otherwise run a concurrent drag that Escape could not reach.
|
||||
if (strongThis)
|
||||
@@ -1561,8 +1565,6 @@ void TableView::AppendResizeGripperVisual(
|
||||
{
|
||||
state->startValue = col.ActualWidth();
|
||||
state->startWidth = col.Width();
|
||||
state->didWrite = false;
|
||||
state->didDelta = false;
|
||||
}
|
||||
|
||||
// Published so Escape can find the gesture in flight; the gripper owns everything else
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
<x:Double x:Key="TableViewRowMinHeight">40</x:Double>
|
||||
<Thickness x:Key="TableViewHeaderCellPadding">8,4,8,4</Thickness>
|
||||
<!-- Mirrored: TableView_themeresources.xaml is not emitted for the Tabular binary. -->
|
||||
<x:Double x:Key="TableViewResizeGripperWidth">8</x:Double>
|
||||
|
||||
<SolidColorBrush x:Key="TabularSurfaceRowBackgroundBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="TabularSurfaceRowForegroundBrush" Color="{ThemeResource TextFillColorPrimary}" />
|
||||
|
||||
@@ -52,6 +52,36 @@ struct Entry
|
||||
|
||||
Entry c_typeEntries[] =
|
||||
{
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Private.Controls.ResizeGripper",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]()
|
||||
{
|
||||
auto xamlType = winrt::make_self<XamlType>(
|
||||
/* Arg 1 - TypeName */
|
||||
(PCWSTR)L"Microsoft.UI.Private.Controls.ResizeGripper",
|
||||
/* Arg 2 - BaseTypeName */
|
||||
(PCWSTR)L"Microsoft.UI.Xaml.Controls.Control",
|
||||
/* Arg 3 - Activator func */
|
||||
(std::function<winrt::IInspectable()>)[](){ return ActivateInstanceWithFactory<winrt::IResizeGripperFactory>(L"Microsoft.UI.Private.Controls.ResizeGripper"); },
|
||||
/* Arg 4 - Populate properties func */
|
||||
(std::function<void(XamlTypeBase&)>)[](XamlTypeBase& xamlType)
|
||||
{
|
||||
winrt::IResizeGripperStatics statics = GetFactory<winrt::IResizeGripperStatics>(L"Microsoft.UI.Private.Controls.ResizeGripper");
|
||||
{
|
||||
xamlType.AddDPMember(L"DragOrientation", L"Microsoft.UI.Xaml.Controls.Orientation", statics.DragOrientationProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"IsDragging", L"Boolean", statics.IsDraggingProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"KeyboardIncrement", L"Double", statics.KeyboardIncrementProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"ManipulationContainer", L"Microsoft.UI.Xaml.UIElement", statics.ManipulationContainerProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"OwnerName", L"String", statics.OwnerNameProperty(), false /* isContent */);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return static_cast<winrt::IXamlType>(*xamlType);
|
||||
}
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Private.Controls.SortIndicator",
|
||||
@@ -97,10 +127,12 @@ Entry c_typeEntries[] =
|
||||
winrt::ITableViewStatics statics = GetFactory<winrt::ITableViewStatics>(L"Microsoft.UI.Xaml.Controls.Tabular.TableView");
|
||||
{
|
||||
xamlType.AddDPMember(L"AlternatingRowBackground", L"Microsoft.UI.Xaml.Media.Brush", statics.AlternatingRowBackgroundProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"CanUserResizeColumns", L"Boolean", statics.CanUserResizeColumnsProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"Columns", L"Windows.Foundation.Collections.IVector`1<Microsoft.UI.Xaml.Controls.Tabular.TableViewColumn>", statics.ColumnsProperty(), true /* isContent */);
|
||||
xamlType.AddDPMember(L"Density", L"Microsoft.UI.Xaml.Controls.Tabular.TableViewDensity", statics.DensityProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"EmptyTemplate", L"Microsoft.UI.Xaml.DataTemplate", statics.EmptyTemplateProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"GridLinesVisibility", L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGridLinesVisibility", statics.GridLinesVisibilityProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"GroupHeaderTemplate", L"Microsoft.UI.Xaml.DataTemplate", statics.GroupHeaderTemplateProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"HeadersVisibility", L"Microsoft.UI.Xaml.Controls.Tabular.TableViewHeadersVisibility", statics.HeadersVisibilityProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"IsReadOnly", L"Boolean", statics.IsReadOnlyProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"ItemsSource", L"Object", statics.ItemsSourceProperty(), false /* isContent */);
|
||||
@@ -162,6 +194,7 @@ Entry c_typeEntries[] =
|
||||
winrt::ITableViewColumnStatics statics = GetFactory<winrt::ITableViewColumnStatics>(L"Microsoft.UI.Xaml.Controls.Tabular.TableViewColumn");
|
||||
{
|
||||
xamlType.AddDPMember(L"ActualWidth", L"Double", statics.ActualWidthProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"CanResize", L"Boolean", statics.CanResizeProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"CellEditingTemplate", L"Microsoft.UI.Xaml.DataTemplate", statics.CellEditingTemplateProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"FrozenEdge", L"Microsoft.UI.Xaml.Controls.Tabular.TableViewFrozenEdge", statics.FrozenEdgeProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"Header", L"Object", statics.HeaderProperty(), true /* isContent */);
|
||||
@@ -263,6 +296,110 @@ Entry c_typeEntries[] =
|
||||
return xamlType;
|
||||
}
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGroupHeader",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]()
|
||||
{
|
||||
auto xamlType = winrt::make_self<XamlType>(
|
||||
/* Arg 1 - TypeName */
|
||||
(PCWSTR)L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGroupHeader",
|
||||
/* Arg 2 - BaseTypeName */
|
||||
(PCWSTR)L"Microsoft.UI.Xaml.Controls.ContentControl",
|
||||
/* Arg 3 - Activator func */
|
||||
(std::function<winrt::IInspectable()>)[](){ return ActivateInstanceWithFactory<winrt::ITableViewGroupHeaderFactory>(L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGroupHeader"); },
|
||||
/* Arg 4 - Populate properties func */
|
||||
(std::function<void(XamlTypeBase&)>)[](XamlTypeBase& xamlType)
|
||||
{
|
||||
winrt::ITableViewGroupHeaderStatics statics = GetFactory<winrt::ITableViewGroupHeaderStatics>(L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGroupHeader");
|
||||
{
|
||||
xamlType.AddDPMember(L"IsExpandable", L"Boolean", statics.IsExpandableProperty(), false /* isContent */);
|
||||
xamlType.AddDPMember(L"IsExpanded", L"Boolean", statics.IsExpandedProperty(), false /* isContent */);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return static_cast<winrt::IXamlType>(*xamlType);
|
||||
}
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGroupInfo",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]()
|
||||
{
|
||||
auto xamlType = winrt::make_self<XamlType>(
|
||||
/* Arg 1 - TypeName */
|
||||
(PCWSTR)L"Microsoft.UI.Xaml.Controls.Tabular.TableViewGroupInfo",
|
||||
/* Arg 2 - BaseTypeName */
|
||||
(PCWSTR)L"Object",
|
||||
/* Arg 3 - Activator func */
|
||||
nullptr,
|
||||
/* Arg 4 - Populate properties func */
|
||||
(std::function<void(XamlTypeBase&)>)[](XamlTypeBase& xamlType)
|
||||
{
|
||||
xamlType.AddMember(
|
||||
L"IsExpandable", /* propertyName */
|
||||
L"Boolean", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return box_value(instance.as<winrt::TableViewGroupInfo>().IsExpandable()); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
xamlType.AddMember(
|
||||
L"IsExpanded", /* propertyName */
|
||||
L"Boolean", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return box_value(instance.as<winrt::TableViewGroupInfo>().IsExpanded()); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
xamlType.AddMember(
|
||||
L"ItemCount", /* propertyName */
|
||||
L"Int32", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return box_value(instance.as<winrt::TableViewGroupInfo>().ItemCount()); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
xamlType.AddMember(
|
||||
L"ItemCountText", /* propertyName */
|
||||
L"String", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return box_value(instance.as<winrt::TableViewGroupInfo>().ItemCountText()); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
xamlType.AddMember(
|
||||
L"Key", /* propertyName */
|
||||
L"Object", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return instance.as<winrt::TableViewGroupInfo>().Key(); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
xamlType.AddMember(
|
||||
L"KeyText", /* propertyName */
|
||||
L"String", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return box_value(instance.as<winrt::TableViewGroupInfo>().KeyText()); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
xamlType.AddMember(
|
||||
L"Level", /* propertyName */
|
||||
L"Int32", /* propertyType */
|
||||
[](winrt::IInspectable instance) { return box_value(instance.as<winrt::TableViewGroupInfo>().Level()); },
|
||||
nullptr, /* setter */
|
||||
false, /* isContent */
|
||||
false, /* isDependencyProperty */
|
||||
false /* isAttachable */);
|
||||
});
|
||||
|
||||
return static_cast<winrt::IXamlType>(*xamlType);
|
||||
}
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.Controls.Tabular.TableViewHeadersVisibility",
|
||||
@@ -607,6 +744,12 @@ Entry c_typeEntries[] =
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Double"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Int32",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Int32"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Private.Controls.SortIndicatorDirection",
|
||||
@@ -630,9 +773,9 @@ Entry c_typeEntries[] =
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Int32",
|
||||
L"Microsoft.UI.Xaml.Controls.ContentControl",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Int32"); }
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Microsoft.UI.Xaml.Controls.ContentControl"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
@@ -646,6 +789,12 @@ Entry c_typeEntries[] =
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Microsoft.UI.Xaml.Controls.DataTemplateSelector"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.Controls.Orientation",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Microsoft.UI.Xaml.Controls.Orientation"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.Controls.Panel",
|
||||
@@ -688,6 +837,12 @@ Entry c_typeEntries[] =
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Microsoft.UI.Xaml.ResourceDictionary"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.UIElement",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Microsoft.UI.Xaml.UIElement"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"Microsoft.UI.Xaml.Visibility",
|
||||
@@ -700,6 +855,12 @@ Entry c_typeEntries[] =
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"Object"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"String",
|
||||
/* Arg2 CreateXamlTypeCallback */
|
||||
[]() { return winrt::make<PrimitiveXamlType>((PCWSTR)L"String"); }
|
||||
},
|
||||
{
|
||||
/* Arg1 TypeName */
|
||||
L"ValueType",
|
||||
@@ -735,6 +896,7 @@ std::wstring_view c_knownNamespacePrefixes[] =
|
||||
};
|
||||
}
|
||||
|
||||
#include "ResizeGripper.properties.h"
|
||||
#include "SortIndicator.properties.h"
|
||||
#include "TableView.properties.h"
|
||||
#include "TableViewColumn.properties.h"
|
||||
@@ -745,6 +907,7 @@ namespace {
|
||||
|
||||
void ClearTypeProperties()
|
||||
{
|
||||
ResizeGripperProperties::ClearProperties();
|
||||
SortIndicatorProperties::ClearProperties();
|
||||
TableViewProperties::ClearProperties();
|
||||
TableViewColumnProperties::ClearProperties();
|
||||
|
||||
Reference in new issue
Block a user